-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
Milestone
Description
Hi!
Currently create-react-app uses thread-loader with default options in both the development and production configs:
create-react-app/packages/react-scripts/config/webpack.config.dev.js
Lines 211 to 213 in bf3d73c
// This loader parallelizes code compilation, it is optional but | |
// improves compile time on larger projects | |
require.resolve('thread-loader'), |
create-react-app/packages/react-scripts/config/webpack.config.prod.js
Lines 237 to 239 in bf3d73c
// This loader parallelizes code compilation, it is optional but | |
// improves compile time on larger projects | |
require.resolve('thread-loader'), |
The production usage is fine, however as mentioned here, when watching is enabled (ie the development config with webpack-dev-server) the poolTimeout
option should be changed from its default of 500
ms to Infinity
to avoid paying the overhead of worker startup on every rebuild.
See:
https://github.com/webpack-contrib/thread-loader#examples
jfrolich