Closed
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
create-react-app/packages/react-scripts/config/webpack.config.prod.js
Lines 237 to 239 in bf3d73c
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