Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slow production build

See original GitHub issue

Not sure if the project is too large or there is something wrong, but my yarn run build took almost 5 minutes.


The project is about 1k5 files:

git ls-files | wc -l

Is it normal? Is there any --debug option to verbosely view the time took to compile the project?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:36 (25 by maintainers)

github_iconTop GitHub Comments

trungdq88commented, Aug 16, 2017

Updated to react-scripts 1.0.11 today (with webpack 3), build time reduced from 280s -> 175s. That’s something 😃


gaearoncommented, Jul 11, 2017

We’ll switch to Webpack 3 soon which will be a tad faster. Unfortunately there’s only so much we can do when underlying tools are slow 😢

I see you’re using code splitting—maybe this could help? I’m not sure how exactly you’re using it.

Other than that, I don’t really have good news for you. You can contribute to webpack to make it faster, or maybe investigate approaches like HappyPack and whether we could switch to them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimizing Performance - React
If you're benchmarking or experiencing performance problems in your React apps, make sure you're testing with the minified production build.
Read more >
Create react app production build very slow on high end ...
It takes around 20 minutes to build. We thought maybe it's our machine, so we ran it on a server with 32 core...
Read more >
How to boost the speed of your webpack build?
A story of performance optimization and application of the Pareto principle for a webpack build that has become far too long.
Read more >
Build Performance - webpack
This guide contains some useful tips for improving build/compilation performance. General. The following best practices should help, whether you're running ...
Read more >
Webpack production build very very slow - GSAP - GreenSock
I encourage you to start from nothing and include the bare minimum in your webpack build and then see if the issue still...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found