Closed as duplicate of#146
Description
Describe the bug
src/server/index.ts
is transformed. In the transform, src/app/entry-server.ts
import and usage is added to src/server/index.ts
.
So App.vue is imported within the transform.
When I change some code, inside the script, the following error occur:

Reproduction
https://github.com/yooouuri/hono-vue
Steps to reproduce
pnpm install
pnpm run dev
Add a <script setup lang="ts"></script> to the App.vue and tinker a little bit.
System Info
System:
OS: macOS 15.3
CPU: (12) arm64 Apple M4 Pro
Memory: 86.00 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.5.0 - ~/.nvm/versions/node/v23.5.0/bin/node
npm: 11.1.0 - ~/.nvm/versions/node/v23.5.0/bin/npm
pnpm: 10.2.1 - ~/.nvm/versions/node/v23.5.0/bin/pnpm
bun: 1.2.2 - /opt/homebrew/bin/bun
Browsers:
Safari: 18.3
npmPackages:
@vitejs/plugin-vue: ^5.2.1 => 5.2.1
vite: ^6.1.0 => 6.1.0
Used Package Manager
pnpm
Logs
No response
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.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- 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.