Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Export runtime-vapor to support unit-test for Vapor Mode | GoodFirstPicks

Export runtime-vapor to support unit-test for Vapor Mode

vuejs/core 1 comments 1mo ago
View on GitHub
lowopenScope: somewhat clearSkill match: maybeTest focusedVueTypeScript

Why this is a good first issue

Issue requests exporting a specific runtime module for testing purposes.

AI Summary

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.

Issue Description

Vue version

3.6.0-beta.5

Link to minimal reproduction

https://github.com/zhiyuanzmj/router

Steps to reproduce

1 . git clone https://github.com/zhiyuanzmj/router -b vapor-issue 2. pnpm install && pnpm test

What is expected?

Export runtime-vapor from vue's cjs-bundler.

What is actually happening?

Will report a defineVaporComponent is not a function error

Image

System Info

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

Any additional comments?

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.

GitHub Labels

need discussionscope: vapor

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • requires understanding of Vapor mode exports
Loading labels...

Details

Points10 pts
Difficultylow
Scopesomewhat clear
Skill Matchmaybe
Test Focusedyes