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

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.