-
Notifications
You must be signed in to change notification settings - Fork 902
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
Incomplete check for @react-native/metro-config
#1987
Comments
Suggestion: Can we add a field in |
cc @huntie |
@tido64 Yeah I've considered this. It would require adding an untyped metadata key, e.g. There's also the workaround of a "suppression" comment within (e.g. at the top of) the file: // Extends '@react-native/metro-config' Related: |
I don't think that will scale as you have more teams working with React Native. At Microsoft, all teams use a shared Metro config unless they have a very good reason not to. We're not going back to having individual teams configuring Metro for themselves.
That's currently what we're telling people to do: microsoft/rnx-kit#2481 |
@tido64 Planned fix incoming. |
Summary: Towards react-native-community/cli#1987. Will be paired with a CLI PR targeting React Native 0.72.1. Changelog: None Differential Revision: D47125080 fbshipit-source-id: 17dec929313605fe7a91b1b5c6923ee04bdcf8b9
…38126) Summary: Pull Request resolved: facebook#38126 Towards react-native-community/cli#1987. Will be paired with a CLI PR targeting React Native 0.72.1. Changelog: None Reviewed By: motiz88 Differential Revision: D47125080 fbshipit-source-id: 9c5eb9ed791ace7a1314ebc26e4dcf494cf190e1
Summary: Pull Request resolved: #38126 Towards react-native-community/cli#1987. Will be paired with a CLI PR targeting React Native 0.72.1. Changelog: None Reviewed By: motiz88 Differential Revision: D47125080 fbshipit-source-id: b3b9d93ba747240f5168021ccb793ffe5d34251d
Change has landed and should be shipped in React Native 0.72.2. |
Thank you! |
Summary: Pull Request resolved: #38126 Towards react-native-community/cli#1987. Will be paired with a CLI PR targeting React Native 0.72.1. Changelog: None Reviewed By: motiz88 Differential Revision: D47125080 fbshipit-source-id: b3b9d93ba747240f5168021ccb793ffe5d34251d
Environment
n/a
Description
The check for whether
@react-native/metro-config
is incomplete becausemetro.config.js
is not necessarily self-contained:cli/packages/cli-plugin-metro/src/tools/loadMetroConfig.ts
Lines 100 to 104 in 3569633
Metro config can be split in several files (or modules) for reusability. The check fails for these scenarios. Example: microsoft/rnx-kit#2481
Reproducible Demo
metro.config.js
by moving the@react-native/metro-config
import to a separate fileThe text was updated successfully, but these errors were encountered: