System Design · Junior · Question 26 of 75

Why split the JS bundle into parts (code splitting)?

Explanation

One huge bundle slows down the first load. Splitting by routes and heavy components (import(), React.lazy) reduces the initial size. Frameworks like Next.js split by routes automatically.

Further reading

Problem with a question

System Design · Junior · question 26

Test yourself

Take the System Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz