1import { ExpoConfig, Platform } from '@expo/config';
2
3/** Which bundler each platform should use. */
4export type PlatformBundlers = Record<Platform, 'metro' | 'webpack'>;
5
6/** Get the platform bundlers mapping. */
7export function getPlatformBundlers(exp: Partial<ExpoConfig>): PlatformBundlers {
8  return {
9    // @ts-expect-error: not on type yet
10    ios: exp.ios?.bundler ?? 'metro',
11    // @ts-expect-error: not on type yet
12    android: exp.android?.bundler ?? 'metro',
13    web: exp.web?.bundler ?? 'webpack',
14  };
15}
16