System Design · Senior · Question 27 of 75
Why do users get a ChunkLoadError after an SPA deploy?
- ✓Correct answer: An old tab requests a chunk that has already been removed
- 2The browser doesn't support dynamic module imports
- 3The CDN blocks JavaScript files larger than 1 MB
Explanation
Hashed names change, and a lazily loaded chunk of the old version disappears. Solutions: keep assets from the last few releases, catch the error and reload the page, version skew protection (deploymentId in Next.js).