You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dev server keeps the source <link rel="stylesheet"> tag after a failed CSS root recovers #40081
With styles.css = body { color: red; }, fetch /. The head is rewritten as expected: <head>\n \n <link rel="stylesheet" href="/_bun/asset/0d61081dd500b664.css"></head>
Write styles.css = body { color: red; }} (a syntax error). Fetch /: the build error page, status 500. Expected.
Write styles.css = body { color: green; }. Fetch /.
The same happens when the stylesheet has the syntax error from the start and is then fixed, and the extra tag stays on every later edit.
What is the expected behavior?
The head contains only the bundled link, as in step 1:
A browser then requests /styles.css, which the HTML route answers with the HTML fallback (status 200, text/html), so the browser logs a MIME type error for that stylesheet. The route that recovers from a failure takes a different path than the first build and does not strip the source link tags.
Additional information
Found while tightening the assertions in test/bake/dev/css.test.ts. The test helper there reads only the /_bun/asset/ links for now.
Reproduced: after a parse-failed CSS root recovers, the dev server reuses HTML stored during the failed build, which keeps the source link tag.
Fix in progress: #40092
Activity
robobun commentedon Aug 22, 2026
Reproduced: after a parse-failed CSS root recovers, the dev server reuses HTML stored during the failed build, which keeps the source link tag.
Fix in progress: #40092
test(bake): remove the fixed 1s overlay poll from the dev server harn…
Jarred-Sumner commentedon Oct 8, 2026
Use handoff tool. GitHub issues are for user-facing issues and a user did not run into this issue