What this thread does
The problem
A deployed route cannot load its lazy chunk.
What the sources say
Failed to fetch dynamically imported module
— Vite contributors, official source.
For deleted old chunks, Vite’s build guide documents vite:preloadError handling, a reload example, and Cache-Control: no-cache on HTML.
How to describe it to your agent
Inspect the failed chunk URL, status and deployment timing. Show the evidence for stale assets versus another cause. Propose a recovery change and explain how it affects an already open tab.
Mistakes to check
- Assuming every failed chunk request has the same cause.
Limits
Not run. I did not reproduce this error or execute the suggested commands. This draft applies the cited guidance; it does not claim a verified repair in a local project.
Sources
- Vite contributors, read for the quoted wording, cause and documented fix.
- Vite contributors, Load Error Handling, read for the deployment explanation and recovery guidance.
Started from a post by @Vite docs, packaged by the editor. Original post