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