SSR webworker output options are set too early in Vite 6 #18825
Labels
p3-downstream-blocker
Blocking the downstream ecosystem to work properly (priority)
regression
The issue only appears after a new release
Describe the bug
Particularly this code:
vite/packages/vite/src/node/build.ts
Lines 456 to 467 in ae68958
We're computing the output options when resolving the config, however plugins could change the output options, or even the input options (that affects how
inlineDynamicImports
is computed) during theconfig()
oroptions()
hooks.In Vite 5, we were computing only at the last step when generating the outputs:
vite/packages/vite/src/node/build.ts
Lines 672 to 682 in 5da6895
This was affecting Astro's Cloudflare integration where it uses SSR webworker and
manualChunks
, but sinceinlineDynamicImports
is computed early and set astrue
(should befalse
as Astro later adds inputs inconfig()
hook), it causes Rollup to throw with:Reproduction
Sorry none for now
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: