You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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.
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 of500
ms toInfinity
to avoid paying the overhead of worker startup on every rebuild.See:
https://github.com/webpack-contrib/thread-loader#examples
The text was updated successfully, but these errors were encountered: