mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
metro-config: Don't always assert import/require with unstable_enablePackageExports (#49780)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49780 Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source. Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447. Changelog: [Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro. Reviewed By: hoxyq Differential Revision: D70473577
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b3bba2a4df
commit
525cb6117b
@@ -53,7 +53,7 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
|
||||
resolver: {
|
||||
resolverMainFields: ['react-native', 'browser', 'main'],
|
||||
platforms: ['android', 'ios'],
|
||||
unstable_conditionNames: ['require', 'import', 'react-native'],
|
||||
unstable_conditionNames: ['react-native'],
|
||||
},
|
||||
serializer: {
|
||||
// Note: This option is overridden in cli-plugin-metro (getOverrideConfig)
|
||||
|
||||
Reference in New Issue
Block a user