Suggest an editImprove this articleRefine the answer for “What is code splitting?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**Code splitting** is a technique for splitting the final bundle into several smaller parts instead of one large file, allowing you to load only the code that is actually needed at that moment. **Key point:** code splitting makes the application faster and more efficient, because the user loads only the needed code while the rest is pulled in later.Shown above the full answer for quick recall.Answer (EN)Image**Code splitting** is a technique for splitting the final bundle into several smaller parts instead of one large file. In Webpack this allows loading only the code that is actually needed at that moment. --- ### Why it is used - **speeds up the initial page load** - no need to load all the JS at once - **reduces the size of the main bundle** - **loads additional modules "on demand"** --- ### Typical examples 1. **Splitting vendor code** (React, lodash, moment, etc.) into a separate bundle 2. **Lazy loading pages** in an SPA (dynamic `import()`): ```js import('./Page.js').then(...) ``` 3. **Optimization via** `splitChunks` in Webpack --- ### Summary Code splitting makes the application faster and more efficient, because the user loads only the code they need, while the rest is pulled in later, as needed.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.