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.
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!
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!