Skip to content

Commit

Permalink
Configured the thread-loader to keeping workers alive in development …
Browse files Browse the repository at this point in the history
…mode (#4562)
  • Loading branch information
Dmitriy Sadkovoy authored and gaearon committed Jun 5, 2018
1 parent fffe909 commit d0afe4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,12 @@ module.exports = {
use: [
// This loader parallelizes code compilation, it is optional but
// improves compile time on larger projects
require.resolve('thread-loader'),
{
loader: require.resolve('thread-loader'),
options: {
poolTimeout: Infinity // keep workers alive for more effective watch mode
},
},
{
loader: require.resolve('babel-loader'),
options: {
Expand Down

4 comments on commit d0afe4b

@danielberndt
Copy link
Contributor

@danielberndt danielberndt commented on d0afe4b Jul 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's this specific commit, but upgrading from 2.0.0-next.66cc7a90 to 2.0.0-next.3e165448 lead to a very hard to debug issue.

When running yarn build on circleci (node 9.6.1 on debian) I got this error message:

Creating an optimized production build...
events.js:112
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at _errnoException (util.js:1003:13)
    at WriteWrap.afterWrite [as oncomplete] (net.js:852:14)

After some digging I found references to the thread-loader in some error log. I know this isn't hard evidence (So I didn't file an issue yet). But it's maybe worth keeping an eye on this.

@Timer
Copy link
Contributor

@Timer Timer commented on d0afe4b Jul 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you open a formal issue @danielberndt?

@danielberndt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I tried really hard to reproduce it with a new project and wasn't able to. So I guess it had something to do with my specific setup.

@kanzelm3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am experiencing this issue on 2.0.0-next.3e165448 with yarn build on circleci as well. We have a fairly large app, so maybe it has something to do with the size of the project?

Please sign in to comment.