question-mark
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.

Webpack 2 Dynamic Imports are Very Slow

See original GitHub issue

While we officially support dynamic import() proposal, it is reported to have significant build performance issues (https://github.com/facebookincubator/create-react-app/issues/2172#issuecomment-301791999, https://github.com/webpack/webpack/issues/4636).

We are going to de-emphasize their support in the documentation until Webpack fixes them. I will disable the require.ensure deprecation, and will track re-enabling it in this issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, May 27, 2017

react-scripts@1.0.7 now use Webpack 2 which supports import hints: https://github.com/webpack/webpack/issues/4807#issuecomment-300443876. Please give it a try!

0reactions
ingrocommented, May 24, 2017

Sure, that seems an easy enough PR to start with 😛

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 2 Dynamic Import degrades build performance (slow ...
The dynamic import functionality has reduced my bundle size astronomically by breaking all of my react components into separate chunks that get ...
Read more >
Webpack and Dynamic Imports: Doing it Right - Medium
The problem is if you want to dynamically load a file, in this case, an image, Webpack by default generate a chunk for...
Read more >
How to Make Your App Faster with Webpack Dynamic Imports
Slow sites make users leave. And it's also bad for SEO — Google rewards quick sites. What you should be doing is to...
Read more >
Typescript is absurdly slow when developing with dynamic ...
I'm running into a very frustrating issue with Typescript when I'm developing with dynamic import() in React, (Github repo and Sandbox links ...
Read more >
Build Performance - webpack
It is possible to shorten build times by removing ProgressPlugin from webpack's configuration. Keep in mind, ProgressPlugin might not provide as much value...
Read more >

github_iconTop Related Medium Post

No results found

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found