diff --git a/local-cli/default.config.js b/local-cli/default.config.js index ecc1e0a8a..57a39def0 100644 --- a/local-cli/default.config.js +++ b/local-cli/default.config.js @@ -34,6 +34,10 @@ var config = { }; function getRoots() { + var root = process.env.REACT_NATIVE_APP_ROOT; + if (root) { + return [path.resolve(root)]; + } if (__dirname.match(/node_modules[\/\\]react-native[\/\\]local-cli$/)) { // Packager is running from node_modules. // This is the default case for all projects created using 'react-native init'.