Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.73 KB

README.md

File metadata and controls

36 lines (28 loc) · 1.73 KB

React Bundle Preloading

This project makes it possible to determine which Webpack bundles should be preloaded in the client.

We do this by recording which modules were dynamically imported during server render and using a pre-generated manifest to find the corresponding client bundles. This is still a work in progress

Why is this important?

Dynamic imports allow us to split our application up into smaller chunks so that we spend less time loading and preparing JavaScript in the browser. But because bundles are loaded only when used, we may end up waiting for several round trips as we load JavaScript, execute some code, and then discover a new dynamic import that requires even more JavaScript to be loaded.

Before and after

Before After

How this works