Repository navigation
fix(bundled-dev): emit assets referenced by inline workers during load - #23103
Conversation
|
Instead of adding tests to |
|
cc @h-a-n-a |
|
I don't feel like there's anything that blocks us from adding this to the
What're the issues you were referring to here? |
|
the worker playground is now disabled, so I assumed there are many tests failing Lines 29 to 32 in 02cffa9 |
I see. I haven't checked these yet. Maybe we should try to enable the test and see if anything fails and use |
|
I tried to enable worker bundled-dev test cases. Unlike other enabled test cases in Vite playground. These cases were not triaged. But I feel like we can remove it from the exclude list first and gradually enable them. #23289 cc @sapphi-red |
|
I've verified this locally, and it seems I can't enable any of the test cases skipped in #23289. |
The inline branch of
vite:worker(?worker&inline,?sharedworker&inline) embeds the worker entry as a blob URL, but assets the worker references are still emitted as separate files. Those files normally reach the output throughgenerateBundle, which an HMR patch skips. When the worker is re-bundled for a patch, the referenced asset gets a new content-hash filename that was never emitted, so requests for it fall through to the SPA fallback and returntext/html.Emit the cached worker assets during
loadin the inline branch as well, matching the non-inline branch from #23068.