Fix a bug on empty NODE_PATH (#2264)

This commit is contained in:
Dan Abramov
2017-05-19 20:06:15 +01:00
committed by GitHub
parent d24311ea79
commit 3a3be7478b
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,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)
process.env.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

View File

@@ -86,7 +86,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)
process.env.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