Commit 546b437
Run Locally: strip crossorigin so CSS loads over file://
Vite stamps crossorigin on the injected <link>/<script>. Over file:// a
crossorigin stylesheet is a CORS request against a null origin with no CORS
headers, so the browser refuses to apply the CSS — the exact "CSS doesn't load
when I open the download" symptom. A post-order transformIndexHtml plugin now
removes the attribute; harmless no-op on the same-origin live site.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 25f0711 commit 546b437
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
7 | 20 | | |
8 | 21 | | |
9 | 22 | | |
10 | 23 | | |
11 | | - | |
| 24 | + | |
12 | 25 | | |
13 | 26 | | |
| 27 | + | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
| |||
0 commit comments