Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite 4 with SSR: HMR not working #46

Closed
7 tasks done
jvanmaaren opened this issue Jan 26, 2023 · 2 comments
Closed
7 tasks done

Vite 4 with SSR: HMR not working #46

jvanmaaren opened this issue Jan 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@jvanmaaren
Copy link

Describe the bug

Description:
For the default setup created by "yarn create vite-extra" (with SSR) HMR does not work

Expectation:
When I change a text in App.tsx, I should immediately see the change in my browser

Reproduction

https://github.com/jvanmaaren/vite4-react-ssr

Steps to reproduce

  • yarn create vite-extra (ssr+react, typescript + SWC)
  • yarn install
  • yarn dev
  • change some text in App.tsx
  • The browser console will say "[vite] hot updated: /src/App.tsx"
  • But the text will not be updated

You can also see the problem in this sandbox:
https://codesandbox.io/p/github/jorgvm/vite4-react-ssr/draft/boring-cherry

All files were created by the "yarn create vite-extra" command

System Info

System:
    OS: macOS 13.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 10.52 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Chrome Canary: 111.0.5560.0
    Edge: 109.0.1518.61
    Firefox: 109.0
    Safari: 16.3
  npmPackages:
    @vitejs/plugin-react-swc: ^3.0.0 => 3.0.1
    vite: ^4.0.0 => 4.0.4

Used Package Manager

yarn

Logs

No response

Validations

@patak-dev patak-dev transferred this issue from vitejs/vite Jan 26, 2023
@ArnaudBarre ArnaudBarre added the bug Something isn't working label Jan 28, 2023
@jvanmaaren
Copy link
Author

thanks!

@ArnaudBarre
Copy link
Member

ArnaudBarre commented Jan 30, 2023

This will be available in next stable version, release Thursday with Vite 4.1 if everything goes well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants