File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11const { makeMetroConfig } = require ( "@rnx-kit/metro-config" ) ;
2- module . exports = makeMetroConfig ( {
2+
3+ const config = makeMetroConfig ( {
34 transformer : {
45 getTransformOptions : async ( ) => ( {
56 transform : {
@@ -9,3 +10,15 @@ module.exports = makeMetroConfig({
910 } ) ,
1011 } ,
1112} ) ;
13+
14+ if ( config . watchFolders . length === 0 ) {
15+ // This patch is needed to locate packages in the monorepo from the MacOS app
16+ // which is intentionally kept outside of the workspaces configuration to prevent
17+ // duplicate react-native version and pollution of the package lock.
18+ const path = require ( "node:path" ) ;
19+ config . watchFolders . push (
20+ path . resolve ( __dirname , "../.." ) ,
21+ ) ;
22+ }
23+
24+ module . exports = config ;
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export default tseslint.config(
6868 } ,
6969 {
7070 files : [
71+ "**/metro.config.js" ,
7172 "packages/gyp-to-cmake/bin/*.js" ,
7273 "packages/host/bin/*.mjs" ,
7374 "packages/host/scripts/*.mjs" ,
You can’t perform that action at this time.
0 commit comments