Skip to content

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

@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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @edmorley@Timer@gaearon

        Issue actions

          thread-loader's 'poolTimeout' should be overridden when watching · Issue #4346 · facebook/create-react-app