diff --git a/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap b/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap index c0349d53df..cc21ef510c 100644 --- a/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap +++ b/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap @@ -75,6 +75,7 @@ Object { ], "unstable_conditionNames": Array [ "require", + "import", ], "unstable_conditionsByPlatform": Object { "web": Array [ @@ -252,6 +253,7 @@ Object { ], "unstable_conditionNames": Array [ "require", + "import", ], "unstable_conditionsByPlatform": Object { "web": Array [ @@ -429,6 +431,7 @@ Object { ], "unstable_conditionNames": Array [ "require", + "import", ], "unstable_conditionsByPlatform": Object { "web": Array [ @@ -606,6 +609,7 @@ Object { ], "unstable_conditionNames": Array [ "require", + "import", ], "unstable_conditionsByPlatform": Object { "web": Array [ diff --git a/packages/metro-config/src/defaults/index.js b/packages/metro-config/src/defaults/index.js index 140156a33d..b89dc7cb89 100644 --- a/packages/metro-config/src/defaults/index.js +++ b/packages/metro-config/src/defaults/index.js @@ -49,7 +49,7 @@ const getDefaultValues = (projectRoot: ?string): ConfigT => ({ nodeModulesPaths: [], resolveRequest: null, resolverMainFields: ['browser', 'main'], - unstable_conditionNames: ['require'], + unstable_conditionNames: ['require', 'import'], unstable_conditionsByPlatform: { web: ['browser'], },