Skip to content

QuizNot attempted

Old tab, new route

A user has had your SPA open for two hours. You deploy, and the deploy deletes the previous build's files. They now click a route they haven't opened before, which is a lazy chunk. What happens?
1–4 to choose, Enter to submit
Show answer & explanation

Correct answer:

  • The old entry code requests the chunk by its old hashed name, gets a 404, and the dynamic import rejects
  • The running entry only knows the file names from its own build, so it asks for Page-<oldhash>.js, which no longer exists.
  • The import rejects (ChunkLoadError in webpack, a TypeError for native import()), and without handling the user sees an error or a blank area.
  • Not "the browser notices": browsers know nothing about deploys.
  • Not "reloads automatically": only if you wrote a handler for it.
  • Not "the CDN serves the new chunk": different contents live under a different name
  • nothing maps old names to new files.