Skip to content

Commit 3a3be74

Browse files
authored
Fix a bug on empty NODE_PATH (#2264)
1 parent d24311e commit 3a3be74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: packages/react-scripts/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module.exports = {
8888
// https://github.com/facebookincubator/create-react-app/issues/253
8989
modules: ['node_modules', paths.appNodeModules].concat(
9090
// It is guaranteed to exist because we tweak it in `env.js`
91-
process.env.NODE_PATH.split(path.delimiter)
91+
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
9292
),
9393
// These are the reasonable defaults supported by the Node ecosystem.
9494
// We also include JSX as a common component filename extension to support

Diff for: packages/react-scripts/config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = {
8686
// https://github.com/facebookincubator/create-react-app/issues/253
8787
modules: ['node_modules', paths.appNodeModules].concat(
8888
// It is guaranteed to exist because we tweak it in `env.js`
89-
process.env.NODE_PATH.split(path.delimiter)
89+
process.env.NODE_PATH.split(path.delimiter).filter(Boolean)
9090
),
9191
// These are the reasonable defaults supported by the Node ecosystem.
9292
// We also include JSX as a common component filename extension to support

0 commit comments

Comments
 (0)