Describe the bug
When enabling the experimental.bundledDev option in Vite, plugins that rely on injecting and serving Virtual Modules fail to work correctly.
I tested this with two major ecosystem plugins: unocss and vite-plugin-vue-devtools. Both broke simultaneously when bundledDev: true was enabled. It seems the dev server fails to resolve, bundle, or serve virtual modules, resulting in 404 errors or missing code.
Reproduction
https://github.com/Wyatex/bundledDevBug
Steps to reproduce
- Scaffold a standard Vite + Vue project.
- Install
unocss and vite-plugin-vue-devtools, and add them to the plugins array.
- Import
virtual:uno.css in main.ts and use some utility classes.
- Enable
experimental.bundledDev in vite.config.ts:
export default defineConfig({
experimental: {
bundledDev: true
},
plugins: [
VueDevTools(),
UnoCSS(),
vue(),
]
})
System Info
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics
Memory: 29.31 GB / 61.79 GB
Binaries:
Node: 26.4.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\node.EXE
npm: 11.17.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\npm.CMD
pnpm: 11.9.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\pnpm.CMD
bun: 1.3.7 - C:\Users\wyate\.bun\bin\bun.EXE
Deno: 2.9.0 - C:\Users\wyate\.deno\bin\deno.EXE
Browsers:
Chrome: 147.0.7727.139
Edge: Chromium (149.0.4022.98)
Internet Explorer: 11.0.26100.8115
npmPackages:
@vitejs/plugin-vue: ^6.0.7 => 6.0.7
vite: ^8.1.3 => 8.1.3
Used Package Manager
pnpm
Logs
No response
Validations
Describe the bug
When enabling the
experimental.bundledDevoption in Vite, plugins that rely on injecting and serving Virtual Modules fail to work correctly.I tested this with two major ecosystem plugins:
unocssandvite-plugin-vue-devtools. Both broke simultaneously whenbundledDev: truewas enabled. It seems the dev server fails to resolve, bundle, or serve virtual modules, resulting in 404 errors or missing code.Reproduction
https://github.com/Wyatex/bundledDevBug
Steps to reproduce
unocssandvite-plugin-vue-devtools, and add them to thepluginsarray.virtual:uno.cssinmain.tsand use some utility classes.experimental.bundledDevinvite.config.ts:System Info
System: OS: Windows 11 10.0.26200 CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics Memory: 29.31 GB / 61.79 GB Binaries: Node: 26.4.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\node.EXE npm: 11.17.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\npm.CMD pnpm: 11.9.0 - C:\Users\wyate\AppData\Local\fnm_multishells\54680_1783304385204\pnpm.CMD bun: 1.3.7 - C:\Users\wyate\.bun\bin\bun.EXE Deno: 2.9.0 - C:\Users\wyate\.deno\bin\deno.EXE Browsers: Chrome: 147.0.7727.139 Edge: Chromium (149.0.4022.98) Internet Explorer: 11.0.26100.8115 npmPackages: @vitejs/plugin-vue: ^6.0.7 => 6.0.7 vite: ^8.1.3 => 8.1.3Used Package Manager
pnpm
Logs
No response
Validations