Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions packages/cli/src/tools/loadMetroConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import path from 'path';
// @ts-ignore - no typed definition for the package
import {loadConfig} from 'metro-config';
import {existsSync} from 'fs';
import {Config} from '@react-native-community/cli-types';
import findSymlinkedModules from './findSymlinkedModules';

Expand Down Expand Up @@ -38,7 +37,6 @@ export interface MetroConfig {
resolverMainFields: string[];
platforms: string[];
providesModuleNodeModules: string[];
hasteImplModulePath: string | undefined;
};
serializer: {
getModulesRunBeforeMainModule: () => string[];
Expand Down Expand Up @@ -67,15 +65,11 @@ export interface MetroConfig {
* Otherwise, a.native.js will not load on Windows or other platforms
*/
export const getDefaultConfig = (ctx: Config): MetroConfig => {
const hasteImplPath = path.join(ctx.reactNativePath, 'jest/hasteImpl.js');
return {
resolver: {
resolverMainFields: ['react-native', 'browser', 'main'],
platforms: [...ctx.haste.platforms, 'native'],
providesModuleNodeModules: ctx.haste.providesModuleNodeModules,
hasteImplModulePath: existsSync(hasteImplPath)
? hasteImplPath
: undefined,
},
serializer: {
getModulesRunBeforeMainModule: () => [
Expand Down