Issue requests exporting a specific runtime module for testing purposes.
The issue reports that runtime-vapor is not exported from vue's cjs-bundler, causing test failures. The solution likely involves adding the export in the bundler configuration. The scope appears limited but requires knowledge of Vapor mode's runtime exports.
3.6.0-beta.5
https://github.com/zhiyuanzmj/router
1 . git clone https://github.com/zhiyuanzmj/router -b vapor-issue
2. pnpm install && pnpm test
Export runtime-vapor from vue's cjs-bundler.
Will report a defineVaporComponent is not a function error
System:
OS: macOS 26.2
CPU: (10) arm64 Apple M1 Pro
Memory: 129.38 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.8.0 - /usr/local/bin/node
Yarn: 1.22.22 - /usr/local/bin/yarn
npm: 10.9.2 - /usr/local/bin/npm
pnpm: 10.28.2 - ~/Library/pnpm/pnpm
bun: 1.3.6 - ~/.bun/bin/bun
Browsers:
Chrome: 144.0.7559.133
Safari: 26.2
A temporary solution
// vitest.config.ts
export default defineConfig({
// FIXME: shouldn't be needed
resolve: {
alias: {
// cjs does not export vapor runtime, use esm instead.
"@vue/runtime-core": require.resolve('@vue/runtime-core').replace('index.js', 'dist/runtime-core.esm-bundler.js'),
"@vue/runtime-dom": require.resolve('@vue/runtime-dom').replace('index.js', 'dist/runtime-dom.esm-bundler.js'),
vue: 'vue/dist/vue.runtime.esm-bundler.js',
},
},
})
Since runtime-vapor doesn't export from cjs-bundler. We must use vitest to alias vue as esm-bundler.
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!