Skip to content

Instantly share code, notes, and snippets.

@reggie3
Last active March 1, 2019 09:30
Show Gist options
  • Save reggie3/50e86b384eb9573a105c89b640d9f555 to your computer and use it in GitHub Desktop.
Save reggie3/50e86b384eb9573a105c89b640d9f555 to your computer and use it in GitHub Desktop.
rn-cliconfig.js for shared projects
const path = require('path');
module.exports = {
// For React Native version 0.57
projectRoot: path.resolve(__dirname),
// tell the builder to also look in the shared directory for imports
watchFolders: [
path.resolve(__dirname, "../shared")
]
// Prior to React Native verision 0.57
getProjectRoots() {
return [
__dirname,
path.join(__dirname, 'node_modules'),
// tell the builder to also look in the shared directory for imports
path.join(__dirname, '../shared'),
)
];
}
};
@cherniavskii
Copy link

Missing comma on line 10 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment