Skip to content

HMR is broken with Vue SSR #525

Closed as duplicate of#146
Closed as duplicate of#146
@yooouuri

Description

@yooouuri

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:

Image

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions