File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed
Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 1- const path = require ( 'path' ) ;
2- const { getDefaultConfig } = require ( '@react-native/metro-config' ) ;
3- const { withMetroConfig } = require ( 'react-native-monorepo-config' ) ;
4-
5- const root = path . resolve ( __dirname , '..' ) ;
1+ const path = require ( 'node:path' ) ;
2+ const { makeMetroConfig } = require ( '@rnx-kit/metro-config' ) ;
63
74/**
85 * Metro configuration
96 * https://facebook.github.io/metro/docs/configuration
107 *
118 * @type {import('metro-config').MetroConfig }
129 */
13- const config = withMetroConfig ( getDefaultConfig ( __dirname ) , {
14- root,
15- dirname : __dirname ,
10+ const config = makeMetroConfig ( {
11+ transformer : {
12+ getTransformOptions : ( ) => ( {
13+ transform : {
14+ experimentalImportSupport : false ,
15+ inlineRequires : false ,
16+ } ,
17+ } ) ,
18+ } ,
1619} ) ;
20+ config . watchFolders = [
21+ ...new Set ( [
22+ ...config . watchFolders ,
23+ // Watch the parent directory, for the "nativescript-jsi" package.
24+ path . resolve ( '..' ) ,
25+ ] ) ,
26+ ] ;
1727
1828module . exports = config ;
Original file line number Diff line number Diff line change 2323 "@react-native/babel-preset" : " 0.83.0" ,
2424 "@react-native/metro-config" : " 0.83.0" ,
2525 "@react-native/typescript-config" : " 0.83.0" ,
26+ "@rnx-kit/metro-config" : " ^2.2.4" ,
2627 "@types/react" : " ^19.2.0" ,
2728 "react-native-builder-bob" : " ^0.40.18" ,
2829 "react-native-monorepo-config" : " ^0.3.3"
You can’t perform that action at this time.
0 commit comments