Skip to content

Commit a0379bf

Browse files
committed
chore: revert to old metro config
This reverts commit 64ae2db.
1 parent 64ae2db commit a0379bf

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

packages/react-native/metro.config.js

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2-
31
/**
4-
* Metro configuration
5-
* https://facebook.github.io/metro/docs/configuration
2+
* Metro configuration for React Native
3+
* https://github.com/facebook/react-native
64
*
7-
* @type {import('metro-config').MetroConfig}
5+
* @format
86
*/
9-
const config = {};
7+
const path = require('path');
108

11-
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
9+
module.exports = {
10+
projectRoot: __dirname,
11+
resolver: {
12+
extraNodeModules: new Proxy(
13+
{},
14+
{
15+
get: (target, name) => path.join(__dirname, `node_modules/${name}`),
16+
},
17+
),
18+
},
19+
transformer: {
20+
getTransformOptions: async () => ({
21+
transform: {
22+
experimentalImportSupport: false,
23+
inlineRequires: false,
24+
},
25+
}),
26+
},
27+
watchFolders: [path.resolve(__dirname, '..', '..')],
28+
};

packages/react-native/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"devDependencies": {
1919
"@babel/core": "^7.12.9",
2020
"@babel/runtime": "^7.12.5",
21-
"@react-native/babel-preset": "^0.73.21",
22-
"@react-native/metro-config": "^0.73.5"
21+
"@react-native/babel-preset": "^0.73.21"
2322
},
2423
"author": {
2524
"name": "AWS SDK for JavaScript Team",

yarn.lock

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ __metadata:
548548
"@babel/core": ^7.12.9
549549
"@babel/runtime": ^7.12.5
550550
"@react-native/babel-preset": ^0.73.21
551-
"@react-native/metro-config": ^0.73.5
552551
react: ^18.3.1
553552
react-native: ^0.73.9
554553
react-native-get-random-values: ^1.11.0
@@ -2428,18 +2427,6 @@ __metadata:
24282427
languageName: node
24292428
linkType: hard
24302429

2431-
"@react-native/metro-config@npm:^0.73.5":
2432-
version: 0.73.5
2433-
resolution: "@react-native/metro-config@npm:0.73.5"
2434-
dependencies:
2435-
"@react-native/js-polyfills": 0.73.1
2436-
"@react-native/metro-babel-transformer": 0.73.15
2437-
metro-config: ^0.80.3
2438-
metro-runtime: ^0.80.3
2439-
checksum: ddf5793664a47bbf16d79d2a4ea7f90cecb01206fbe5fc91aadb5e4169159cf24282ab0116799b9271332b7cb6ce9bc1420a57ad65d9cdfe98ac1e3b9a1f75ae
2440-
languageName: node
2441-
linkType: hard
2442-
24432430
"@react-native/normalize-colors@npm:0.73.2, @react-native/normalize-colors@npm:^0.73.0":
24442431
version: 0.73.2
24452432
resolution: "@react-native/normalize-colors@npm:0.73.2"

0 commit comments

Comments
 (0)