We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d68a989 commit cf64077Copy full SHA for cf64077
packages/react-scripts/config/paths.js
@@ -30,9 +30,14 @@ function resolveApp(relativePath) {
30
// It will then be used by Webpack configs.
31
// Jest doesn’t need this because it already handles `NODE_PATH` out of the box.
32
33
+// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
34
+// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
35
+// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
36
+
37
var nodePaths = (process.env.NODE_PATH || '')
38
.split(process.platform === 'win32' ? ';' : ':')
39
.filter(Boolean)
40
+ .filter(folder => !path.isAbsolute(folder))
41
.map(resolveApp);
42
43
// config after eject: we're in ./config/
0 commit comments