@react-native/metro-config 0.72.1 → 0.72.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -10
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* @noformat
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
/*:: import type {
|
|
11
|
+
/*:: import type {MetroConfig} from 'metro-config'; */
|
|
12
12
|
|
|
13
|
-
const {
|
|
13
|
+
const {mergeConfig} = require('metro-config');
|
|
14
14
|
|
|
15
15
|
const INTERNAL_CALLSITES_REGEX = new RegExp(
|
|
16
16
|
[
|
|
@@ -35,14 +35,15 @@ const INTERNAL_CALLSITES_REGEX = new RegExp(
|
|
|
35
35
|
/**
|
|
36
36
|
* Get the base Metro configuration for a React Native project.
|
|
37
37
|
*/
|
|
38
|
+
|
|
38
39
|
function getDefaultConfig(
|
|
39
40
|
projectRoot /*: string */
|
|
40
|
-
) /*:
|
|
41
|
-
|
|
41
|
+
) /*: MetroConfig */ {
|
|
42
|
+
return {
|
|
42
43
|
resolver: {
|
|
43
44
|
resolverMainFields: ['react-native', 'browser', 'main'],
|
|
44
45
|
platforms: ['android', 'ios'],
|
|
45
|
-
unstable_conditionNames: ['require', 'react-native'],
|
|
46
|
+
unstable_conditionNames: ['require', 'import', 'react-native'],
|
|
46
47
|
},
|
|
47
48
|
serializer: {
|
|
48
49
|
getPolyfills: () => require('@react-native/js-polyfills')(),
|
|
@@ -76,11 +77,6 @@ function getDefaultConfig(
|
|
|
76
77
|
},
|
|
77
78
|
watchFolders: [],
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
-
return mergeConfig(
|
|
81
|
-
getBaseConfig.getDefaultValues(projectRoot),
|
|
82
|
-
config,
|
|
83
|
-
);
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
module.exports = {getDefaultConfig, mergeConfig};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/metro-config",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.3",
|
|
4
4
|
"description": "Metro configuration for React Native.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"exports": "./index.js",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@react-native/js-polyfills": "^0.72.1",
|
|
14
|
-
"metro-config": "0.76.
|
|
15
|
-
"metro-react-native-babel-transformer": "0.76.
|
|
16
|
-
"metro-runtime": "0.76.
|
|
14
|
+
"metro-config": "0.76.2",
|
|
15
|
+
"metro-react-native-babel-transformer": "0.76.2",
|
|
16
|
+
"metro-runtime": "0.76.2"
|
|
17
17
|
}
|
|
18
18
|
}
|