Don't use app node_modules folder as a resolve fallback (#3884)

This commit is contained in:
Dan Abramov
2018-01-21 19:05:24 +00:00
committed by GitHub
parent db75a16a13
commit 1cf2248c46
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ module.exports = {
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
modules: ['node_modules'].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),

View File

@@ -102,7 +102,7 @@ module.exports = {
// We placed these paths second because we want `node_modules` to "win"
// if there are any conflicts. This matches Node resolution mechanism.
// https://github.com/facebookincubator/create-react-app/issues/253
modules: ['node_modules', paths.appNodeModules].concat(
modules: ['node_modules'].concat(
// It is guaranteed to exist because we tweak it in `env.js`
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
),