-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate crna-kitchen-sink into the monorepo
Add a metro config file to ignore undesired packages from the metro bundle. Also avoid hoisting react-native.
- Loading branch information
1 parent
0d7581a
commit 87f21ac
Showing
10 changed files
with
1,177 additions
and
11,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const path = require('path'); | ||
const blacklist = require('metro-config/src/defaults/blacklist'); | ||
|
||
module.exports = { | ||
watchFolders: [ | ||
// The monorepo | ||
path.resolve(__dirname, '../..'), | ||
], | ||
resolver: { | ||
blacklistRE: blacklist([ | ||
// exclude react-native modules outside of this package | ||
/app\/.*\/node_modules\/react-native\/.*/, | ||
/node_modules\/.*\/node_modules\/react-native\/.*/, | ||
// duplicate packages in server mocks. We don't need them so it's safe to exclude. | ||
/__mocks__\/.*/, | ||
]), | ||
extraNodeModules: { | ||
// resolve react-native to this package's node_modules | ||
'react-native': path.resolve(__dirname, 'node_modules/react-native'), | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.