mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fe2bcbf4ba
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51836 Currently, `community-cli-plugin` loads the user config and then overrides parts of it - specifically `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule`, making it impossible for a user to modify this config. Instead, treat the CLI's resolver and serializer customisations as "Framework defaults", layered on top of `react-native/metro-config` defaults but beneath a user's `metro.config.js`. This allows the user to obtain (via `react-native/metro-config`'s `getDefaultConfig`) and extend or override them, if they need to. This is technically breaking because users who currently have a custom `resolveRequest` or `getModulesRunBeforeMainModule` in their `metro.config.js` will have that config respected from this change, whereas currently they won't have any effect. Changelog: [General][Breaking] Community CLI users: user-defined `resolver.resolveRequest` and `serializer.getModulesRunBeforeMainModule` Metro config now takes precedence over CLI defaults Reviewed By: huntie Differential Revision: D74811395 fbshipit-source-id: c250caf798fdaedb0822bea3d6e65c0c3ae4d691
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"name": "@react-native/community-cli-plugin",
|
|
"version": "0.80.0-main",
|
|
"description": "Core CLI commands for React Native",
|
|
"keywords": [
|
|
"react-native",
|
|
"tools"
|
|
],
|
|
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/community-cli-plugin#readme",
|
|
"bugs": "https://github.com/facebook/react-native/issues",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/facebook/react-native.git",
|
|
"directory": "packages/community-cli-plugin"
|
|
},
|
|
"license": "MIT",
|
|
"exports": {
|
|
".": "./src/index.js",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"dependencies": {
|
|
"@react-native/dev-middleware": "0.80.0-main",
|
|
"chalk": "^4.0.0",
|
|
"debug": "^4.4.0",
|
|
"invariant": "^2.2.4",
|
|
"metro": "^0.82.4",
|
|
"metro-config": "^0.82.4",
|
|
"metro-core": "^0.82.4",
|
|
"semver": "^7.1.3"
|
|
},
|
|
"devDependencies": {
|
|
"metro-resolver": "^0.82.4"
|
|
},
|
|
"peerDependencies": {
|
|
"@react-native-community/cli": "*",
|
|
"@react-native/metro-config": "*"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@react-native-community/cli": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"engines": {
|
|
"node": ">= 22.14.0"
|
|
}
|
|
}
|