vitest-dev / vitest-dev/vitest
(0 , __vite_ssr_import_0__.defineVaporComponent) is not a function
Open
Nobody has claimed this yet.
pending triage
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 92
Description
Describe the bug
VaporInteropPlugin has been set up in Vue Main
After adding vapor to the script in Vue SFC, running Vitest to execute the test results in an error
<script setup vapor lang="ts">
vue SFC script remove vapor
<script setup lang="ts">
Reproduction
System Info
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics
Memory: 2.66 GB / 15.34 GB
Binaries:
Node: 22.16.0 - D:\Program Files\nodejs\node.EXE
npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
pnpm: 10.26.2 - D:\Program Files\nodejs\pnpm.CMD
Browsers:
Chrome: 143.0.7499.170
Edge: Chromium (140.0.3485.54)
Firefox: 144.0.2 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.26100.7309
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked vue-vapor-component reproduction and its Vitest configuration, then trace how VaporInteropPlugin handles the Vue SFC containing <script setup vapor lang="ts">. Compare the failing Vitest run with the same component without vapor; done means the vapor component executes successfully under Vitest without the defineVaporComponent error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100