vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
66.73k stars 5.98k forks source link

Hot reloading does not work #17598

Closed subhero24 closed 1 month ago

subhero24 commented 1 month ago

Describe the bug

When exporting a default from the main javascript file, and importing it somewhere else, hot reloading stops working.

Reproduction

https://github.com/subhero24/vite-bug

Steps to reproduce

System Info

System:
    OS: macOS 14.5
    CPU: (11) arm64 Apple M3 Pro
    Memory: 303.25 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.3.0 - ~/.nvm/versions/node/v22.3.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v22.3.0/bin/npm
    bun: 1.0.26 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 126.1.67.116
    Safari: 17.5
  npmPackages:
    vite: ^5.3.2 => 5.3.2

Used Package Manager

npm

Logs

No response

Validations

sapphi-red commented 1 month ago

Duplicate of #16664