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) {
3030// It will then be used by Webpack configs.
3131// Jest doesn’t need this because it already handles `NODE_PATH` out of the box.
3232
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+
3337var nodePaths = ( process . env . NODE_PATH || '' )
3438 . split ( process . platform === 'win32' ? ';' : ':' )
3539 . filter ( Boolean )
40+ . filter ( folder => ! path . isAbsolute ( folder ) )
3641 . map ( resolveApp ) ;
3742
3843// config after eject: we're in ./config/
You can’t perform that action at this time.
0 commit comments