Skip to content

Instantly share code, notes, and snippets.

@alielmajdaoui
Created October 16, 2021 20:02
Show Gist options
  • Save alielmajdaoui/60a1386b7d2a027b79530473f7804354 to your computer and use it in GitHub Desktop.
Save alielmajdaoui/60a1386b7d2a027b79530473f7804354 to your computer and use it in GitHub Desktop.
Link Local Dependency in React Native - Metro Config - With watchFolders option
// Absolute path to your package
const packagePath =
'/Users/mac/my-own-packages/my-awesome-package';
module.exports = {
resolver: {
nodeModulesPaths: [packagePath],
// rest of metro resolver options...
},
watchFolders: [packagePath],
// rest of metro options...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment