-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@react-native/metro-config
doesn't export default assetExts
and sourceExts
anymore.
#38069
Comments
Hey @gvarandas this is not related to react native configuration just check this comment fromreact-native-svg-transformer |
cc @huntie |
Closing as duplicate. |
Summary: Reverts facebook#36777. This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See facebook/metro#1010 (comment) for further notes. Fixes: - facebook/metro#1010 - facebook#38069 - kristerkari/react-native-svg-transformer#276 Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object. Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config` Differential Revision: D47055973 fbshipit-source-id: 78b59d925be72aa42b4b9d901c6f8d174f2dbae0
Summary: Pull Request resolved: facebook#38092 Reverts facebook#36777. This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See facebook/metro#1010 (comment) for further notes. Fixes: - facebook/metro#1010 - facebook#38069 - kristerkari/react-native-svg-transformer#276 Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object. Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config` Reviewed By: robhogan Differential Revision: D47055973 fbshipit-source-id: eedc4698e651645ada46a013d3945a16965bff22
Summary: Pull Request resolved: #38092 Reverts #36777. This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See facebook/metro#1010 (comment) for further notes. Fixes: - facebook/metro#1010 - #38069 - kristerkari/react-native-svg-transformer#276 Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object. Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config` Reviewed By: robhogan Differential Revision: D47055973 fbshipit-source-id: 5ad23cc9700397110de5c0e81c7d76299761ef0a
Summary: Pull Request resolved: #38092 Reverts #36777. This is motivated by reducing user friction when the widespread assumption is for `react-native/metro-config` to export a complete Metro config, as with Expo/rnx-kit, and like previously understood uses of `metro-config`. See facebook/metro#1010 (comment) for further notes. Fixes: - facebook/metro#1010 - #38069 - kristerkari/react-native-svg-transformer#276 Note that we do not intend for `react-native/metro-config` to directly export `assetExts` etc — these can be accessed on the `resolver` property from the full config object. Changelog: [General][Changed] `react-native/metro-config` now includes all base config values from `metro-config` Reviewed By: robhogan Differential Revision: D47055973 fbshipit-source-id: 5ad23cc9700397110de5c0e81c7d76299761ef0a
This is being cherry picked into the upcoming React Native 0.72.1 release. Please make sure to upgrade |
Description
While upgrading to
0.72.0
, we've noticed that the default config exported by@react-native/metro-config
doesn't contain default values for theassetExts
andsourceExts
options, making it harder to extend those values in case projects need to perform any custom configuration.It seems like this regression was caused due to dropping merging the original Metro config with the RN one (on this commit).
Is this a legit regression or do we expect projects to tap into
metro-config
directly to read those default values (maybe vialoadConfig
)?Happy to provide a PR fixing the issue if it's flagged as a unintended behaviour.
React Native Version
0.72.0
Output of
npx react-native info
Steps to reproduce
0.72.0
yarn
,npm i
, etc)getDefaultConfig
(@react-native/metro-config
) doesn't produce the following structure anymore:Snack, code example, screenshot, or link to a repository
Any new project is capable of checking for this issue.
The code present in the Upgrade Helper would reproduce the issue consistently.
The text was updated successfully, but these errors were encountered: