Create-react-app: Webpack 2 Dynamic Imports are Very Slow

Created on 16 May 2017  路  5Comments  路  Source: facebook/create-react-app

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.

up for grabs! medium

Most helpful comment

[email protected] now use Webpack 2 which supports import hints: https://github.com/webpack/webpack/issues/4807#issuecomment-300443876.
Please give it a try!

All 5 comments

Setting this up as needing contributions. Specifically, we need somebody to help Webpack folks in https://github.com/webpack/webpack/issues/4636 reliably reproduce the performance issue.

Release 2.6.0. of webpack improved the handling of import, maybe the dependency could be updated in react-scripts too?

Yea, we plan to bump to 2.6.0. Want to send a PR?

Sure, that seems an easy enough PR to start with :P

[email protected] now use Webpack 2 which supports import hints: https://github.com/webpack/webpack/issues/4807#issuecomment-300443876.
Please give it a try!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alleroux picture alleroux  路  3Comments

DaveLindberg picture DaveLindberg  路  3Comments

JimmyLv picture JimmyLv  路  3Comments

oltsa picture oltsa  路  3Comments

dualcnhq picture dualcnhq  路  3Comments