From eb677e7454be0412ed817ccb5d9faecec69f8010 Mon Sep 17 00:00:00 2001 From: smacpherson64 Date: Tue, 24 Oct 2017 11:03:42 -0500 Subject: [PATCH 1/3] Updating env.js to use `REACT_APP_NODE_PATH` Changing `NODE_PATH` to `REACT_APP_NODE_PATH` --- packages/react-scripts/config/env.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/env.js b/packages/react-scripts/config/env.js index ebef79ed9..dc90bf990 100644 --- a/packages/react-scripts/config/env.js +++ b/packages/react-scripts/config/env.js @@ -57,7 +57,7 @@ dotenvFiles.forEach(dotenvFile => { // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421 // We also resolve them to make sure all tools using them work consistently. const appDirectory = fs.realpathSync(process.cwd()); -process.env.NODE_PATH = (process.env.NODE_PATH || '') +process.env.REACT_APP_NODE_PATH = (process.env.REACT_APP_NODE_PATH || '') .split(path.delimiter) .filter(folder => folder && !path.isAbsolute(folder)) .map(folder => path.resolve(appDirectory, folder)) From 221ca0ca8922427d7f86082e2df3459cfce0014a Mon Sep 17 00:00:00 2001 From: smacpherson64 Date: Tue, 24 Oct 2017 11:05:03 -0500 Subject: [PATCH 2/3] Updating dev config to use `REACT_APP_NODE_PATH` Changing Dev Config to use `REACT_APP_NODE_PATH` instead of `NODE_PATH` --- packages/react-scripts/config/webpack.config.dev.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 07c0a3adf..f265566bc 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -85,7 +85,7 @@ module.exports = { // https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules', paths.appNodeModules].concat( // It is guaranteed to exist because we tweak it in `env.js` - process.env.NODE_PATH.split(path.delimiter).filter(Boolean) + process.env.REACT_APP_NODE_PATH.split(path.delimiter).filter(Boolean) ), // These are the reasonable defaults supported by the Node ecosystem. // We also include JSX as a common component filename extension to support From 6f81b340dd2080868b262d621bf0630990b0d5ee Mon Sep 17 00:00:00 2001 From: smacpherson64 Date: Tue, 24 Oct 2017 11:05:57 -0500 Subject: [PATCH 3/3] Update prod config to use `REACT_APP_NODE_PATH` Setting prod config to use `REACT_APP_NODE_PATH` instead of `NODE_PATH` --- packages/react-scripts/config/webpack.config.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index 9582ee731..21800949e 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -89,7 +89,7 @@ module.exports = { // https://github.com/facebookincubator/create-react-app/issues/253 modules: ['node_modules', paths.appNodeModules].concat( // It is guaranteed to exist because we tweak it in `env.js` - process.env.NODE_PATH.split(path.delimiter).filter(Boolean) + process.env.REACT_APP_NODE_PATH.split(path.delimiter).filter(Boolean) ), // These are the reasonable defaults supported by the Node ecosystem. // We also include JSX as a common component filename extension to support