File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-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,13 @@ 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 ( path . resolve ( __dirname , "../.." ) ) ;
20+ }
21+
22+ module . exports = config ;
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export default tseslint.config(
4747 {
4848 files : [
4949 "apps/test-app/*.js" ,
50+ "apps/macos-test-app/*.js" ,
5051 "packages/node-addon-examples/**/*.js" ,
5152 "packages/host/babel-plugin.js" ,
5253 "packages/host/react-native.config.js" ,
@@ -68,6 +69,7 @@ export default tseslint.config(
6869 } ,
6970 {
7071 files : [
72+ "**/metro.config.js" ,
7173 "packages/gyp-to-cmake/bin/*.js" ,
7274 "packages/host/bin/*.mjs" ,
7375 "packages/host/scripts/*.mjs" ,
You can’t perform that action at this time.
0 commit comments