Skip to content

fix: use nodeLikeBuiltins for ssr.target: 'webworker' without noExternal: true#19313

Merged
patak-cat merged 1 commit intovitejs:mainfrom
sapphi-red:fix/node-like-builtins-for-ssr-target-workers
Feb 3, 2025
Merged

fix: use nodeLikeBuiltins for ssr.target: 'webworker' without noExternal: true#19313
patak-cat merged 1 commit intovitejs:mainfrom
sapphi-red:fix/node-like-builtins-for-ssr-target-workers

Conversation

@sapphi-red
Copy link
Member

Description

Previously the Cannot bundle Node.js built-in error was only shown when noExternal: true is set.
https://github.com/vitejs/vite/pull/18584/files#diff-9b81bb364c02eab9494a7d27a5effc400cacbffd3b8f349c192f890c37bfc83fL429-L445
To align with that, this PR sets nodeLikeBuiltins by default for ssr.target: 'webworker' without noExternal: true.

This should fix the ecosystem-ci failure of waku: https://github.com/vitejs/vite-ecosystem-ci/actions/runs/13024909071/job/36332279608

refs #18584

@sapphi-red sapphi-red added this to the 6.1 milestone Jan 29, 2025
@sapphi-red sapphi-red added the p3-minor-bug An edge case that only affects very specific usage (priority) label Jan 29, 2025
@sapphi-red
Copy link
Member Author

/ecosystem-ci run

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 29, 2025

Open in Stackblitz

npm i https://pkg.pr.new/vite@19313

commit: 4fcd66f

@vite-ecosystem-ci
Copy link

📝 Ran ecosystem CI on 4fcd66f: Open

suite result latest scheduled
astro failure failure
histoire failure failure
nuxt failure failure
qwik failure failure
redwoodjs failure failure
vitest failure failure
waku success failure

analogjs, ladle, laravel, marko, previewjs, quasar, rakkas, react-router, storybook, sveltekit, unocss, vike, vite-environment-examples, vite-plugin-pwa, vite-plugin-react, vite-plugin-react-swc, vite-plugin-svelte, vite-plugin-vue, vite-setup-catalogue, vitepress, vuepress

@patak-cat patak-cat merged commit 9fc31b6 into vitejs:main Feb 3, 2025
19 checks passed
@sapphi-red sapphi-red deleted the fix/node-like-builtins-for-ssr-target-workers branch February 4, 2025 01:28
moonlitusun pushed a commit to moonlitusun/vite that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p3-minor-bug An edge case that only affects very specific usage (priority) trigger: preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants