Code splitting
Instead of loading all the code at once in one bundle, we can use the code-splitting feature supported by Webpack to lazy-load parts of the application code as currently needed by the user. After we modify the application code to introduce code splitting, Webpack can create multiple bundles rather than one large bundle. These bundles can be loaded dynamically at runtime, allowing us to improve the performance of the application.
To learn more about code splitting support in Webpack and how to make necessary changes to the setup and configuration, check out the guides in the documentation at https://webpack.js.org/guides/code-splitting/.
There are several ways to introduce code splitting for the application code, but the most ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access