Skip to content

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

Closed
@edmorley

Description

@edmorley

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions