File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,14 @@ function resolveApp(relativePath) {
33
33
// It will then be used by Webpack configs.
34
34
// Jest doesn’t need this because it already handles `NODE_PATH` out of the box.
35
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
+
36
40
var nodePaths = ( process . env . NODE_PATH || '' )
37
41
. split ( process . platform === 'win32' ? ';' : ':' )
38
42
. filter ( Boolean )
43
+ . filter ( folder => ! path . isAbsolute ( folder ) )
39
44
. map ( resolveApp ) ;
40
45
41
46
// config after eject: we're in ./config/
You can’t perform that action at this time.
0 commit comments