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:
5
.changeset/fix-spa-fallback-stale-chunk.md
Normal file
5
.changeset/fix-spa-fallback-stale-chunk.md
Normal 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.
|
||||
Reference in New Issue
Block a user