vitejs / vite-plugin-vue

Vite Vue Plugins
MIT License
501 stars 154 forks source link

HMR broken when use script lang="ts" #428

Closed robin-dongbin closed 2 months ago

robin-dongbin commented 4 months ago

Related plugins

Describe the bug

When you update the content of console.log, HMR is broken.

Reproduction

https://stackblitz.com/edit/vitejs-vite-q32exk?file=src%2Fcomponents%2FTest.vue&terminal=dev

Steps to reproduce

Try to update the content of console.log

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.88 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.4.0 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.8.1 - /opt/homebrew/bin/npm
    pnpm: 9.5.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.18 - /opt/homebrew/bin/bun
  Browsers:
    Brave Browser: 126.1.67.123
    Chrome: 126.0.6478.128
    Edge: 126.0.2592.102
    Safari: 17.5
  npmPackages:
    vite: ^5.3.3 => 5.3.3

Used Package Manager

pnpm

Logs

There has no logs when it's broken, it just stuck

Validations

edison1105 commented 2 months ago

duplicate of https://github.com/vitejs/vite-plugin-vue/issues/428 fixed via https://github.com/vitejs/vite-plugin-vue/commit/e4f5fffa4a9d4f08668b93cad6a410ccad543541