Skip to content

Code splitting

Dividing program code into separately loadable parts and planning when they load.

Software Development

What is code splitting?

Code splitting divides program code into separate output parts, often called chunks. Boundaries may be page entry points or dynamically requested modules. Not every part then needs to be in the initial package. The loading workflow determines when a part actually loads. Splitting alone guarantees neither less total data nor a better user experience.

In a fictional portal, an infrequently used report analysis gets its own chunk. That chunk must be reachable when opened; a loading failure needs understandable feedback and a suitable retry route. The team also checks that compatible files still load after deployment. A separate JavaScript file provides no access permission: the analysis data and actions still require protection based on current rights.

Sources

Articles on this topic

Software Development with ASES

Custom software, web and mobile apps