Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy load (chunking) feature? #925

Closed
sandervanhooft opened this issue Oct 18, 2016 · 2 comments
Closed

Lazy load (chunking) feature? #925

sandervanhooft opened this issue Oct 18, 2016 · 2 comments

Comments

@sandervanhooft
Copy link

How can I implement lazy loading?

Would this require (create-react-app-impossiblish) webpack configuration modifications?

As my app is growing (.js > 1mB), the initial load takes longer, especially on mobile connections. So lazy loading of code chunks would provide a great performance boost.

@gaearon
Copy link
Contributor

gaearon commented Oct 18, 2016

You can use require.ensure() because we use webpack under the hood.
When we switch to webpack 2, you can use System.import instead.

@sandervanhooft
Copy link
Author

That's great, thanks! :)

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants