Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread-loader's 'poolTimeout' should be overridden when watching #4346

Closed
edmorley opened this issue Apr 23, 2018 · 1 comment
Closed

thread-loader's 'poolTimeout' should be overridden when watching #4346

edmorley opened this issue Apr 23, 2018 · 1 comment
Milestone

Comments

@edmorley
Copy link

Hi!

Currently create-react-app uses thread-loader with default options in both the development and production configs:

// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
require.resolve('thread-loader'),

// 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

@gaearon
Copy link
Contributor

gaearon commented Apr 23, 2018

Want to send a PR?

@Timer Timer closed this as completed Jun 6, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants