fix(dashboard): return 404 for stale asset paths instead of SPA fallback

The catch-all served index.html for every unmatched URL, so a request
for a stale /assets/<oldhash>.js (after a rebuild changed the chunk
hash) got HTML back. Strict module MIME checking then failed the
script load and the page rendered as a blank shell. Exclude
/assets/, /icons/, /fonts/, /brands/, and any path with a file
extension so those return a real 404 — versionCheck.handleChunkLoadError
already knows how to recover from that.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-08 07:59:49 -07:00
parent 1f5ad20f28
commit 68eff4418c
2 changed files with 18 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Stop the dashboard's SPA catch-all from serving `index.html` for missing asset URLs. Stale `/assets/*.js` requests after a rebuild now get a real 404, so the browser surfaces a chunk-load error (which versionCheck recovers from) instead of poisoning the page with a `text/html` module script and reloading into a blank shell.