Describe the bug
When running the dev server with the new --experimentalBundle flag on Vite 8.0.0-beta.1, the page fails to render and the browser console shows Uncaught ReferenceError: module is not defined. Running dev without --experimentalBundle works fine.
Reproduction
https://github.com/JE-lee/rolldown-vite8-test
Steps to reproduce
pnpm install
pnpm dev --> open browser, the page is good
pnpm dev:bundle --> open browser, fails at runtime with "Uncaught ReferenceError: module is not defined"
System Info
Vite: 8.0.0-beta.1
@vitejs/plugin-vue2: 2.3.3
Node: 22.16.0 (also reproduces on 20.19.x)
OS: Linux
Browser: Chrome (latest)
Expected behavior
Dev server should run with --experimentalBundle without runtime errors.
Used Package Manager
pnpm
Logs
No response
Validations