diff --git a/packages/metro-config/src/loadConfig.js b/packages/metro-config/src/loadConfig.js index 011110cb54..22517d5714 100644 --- a/packages/metro-config/src/loadConfig.js +++ b/packages/metro-config/src/loadConfig.js @@ -46,13 +46,18 @@ function overrideArgument(arg: Array | T): T { } const explorer = cosmiconfig('metro', { - searchPlaces: ['metro.config.js', 'metro.config.json', 'package.json'], - + searchPlaces: [ + 'metro.config.js', + 'metro.config.cjs', + 'metro.config.json', + 'package.json', + ], loaders: { '.json': cosmiconfig.loadJson, '.yaml': cosmiconfig.loadYaml, '.yml': cosmiconfig.loadYaml, '.js': cosmiconfig.loadJs, + '.cjs': cosmiconfig.loadJs, '.es6': cosmiconfig.loadJs, noExt: cosmiconfig.loadYaml, },