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 @@ -30,9 +30,14 @@ function resolveApp(relativePath) {
30
30
// It will then be used by Webpack configs.
31
31
// Jest doesn’t need this because it already handles `NODE_PATH` out of the box.
32
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
+
33
37
var nodePaths = ( process . env . NODE_PATH || '' )
34
38
. split ( process . platform === 'win32' ? ';' : ':' )
35
39
. filter ( Boolean )
40
+ . filter ( folder => ! path . isAbsolute ( folder ) )
36
41
. map ( resolveApp ) ;
37
42
38
43
// config after eject: we're in ./config/
You can’t perform that action at this time.
0 commit comments