Skip to content
This repository was archived by the owner on Oct 19, 2022. It is now read-only.

Commit 0b4196f

Browse files
visualfanaticDominik Rowicki
authored and
Dominik Rowicki
committed
Disable loading constants module (#39)
* Disable loading `constants` module * Disable node constants by default, use `USE_NODE_CONSTANTS` to import native constants
1 parent 54c3b8b commit 0b4196f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/react-scripts/config/webpack.config.dev.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ module.exports = {
298298
net: 'empty',
299299
tls: 'empty',
300300
child_process: 'empty',
301+
constants: process.env.USE_NODE_CONSTANTS === 'true',
301302
},
302303
// Turn off performance hints during development because we don't do any
303304
// splitting or minification in interest of speed. These warnings become

packages/react-scripts/config/webpack.config.prod.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,5 +384,6 @@ module.exports = {
384384
net: 'empty',
385385
tls: 'empty',
386386
child_process: 'empty',
387+
constants: process.env.USE_NODE_CONSTANTS === 'true',
387388
},
388389
};

0 commit comments

Comments
 (0)