Skip to content

Commit ef34be6

Browse files
committed
Use yarn link to install a local module as dependency
1 parent fc24368 commit ef34be6

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

example/metro.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ const blockList = exclusionList([
2727
/.*\.ProjectImports\.zip/,
2828
]);
2929

30+
const extraNodeModules = {
31+
'@react-native-community/image-editor': path.resolve(__dirname, '..'),
32+
};
33+
3034
const config = {
35+
watchFolders: [extraNodeModules['@react-native-community/image-editor']],
3136
resolver: {
3237
blacklistRE: blockList,
3338
blockList,
39+
extraNodeModules,
3440
},
3541
transformer: {
3642
getTransformOptions: async () => ({

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"postinstall": "RCT_NEW_ARCH_ENABLED=1 npx pod-install"
1414
},
1515
"dependencies": {
16-
"@react-native-community/image-editor": "file:..",
16+
"@react-native-community/image-editor": "link:..",
1717
"react": "18.2.0",
1818
"react-native": "0.72.6"
1919
},

example/yarn.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,8 +1683,9 @@
16831683
prompts "^2.4.0"
16841684
semver "^7.5.2"
16851685

1686-
"@react-native-community/image-editor@file:..":
1687-
version "2.3.0"
1686+
"@react-native-community/image-editor@link:..":
1687+
version "0.0.0"
1688+
uid ""
16881689

16891690
"@react-native/assets-registry@^0.72.0":
16901691
version "0.72.0"

0 commit comments

Comments
 (0)