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

HMR does not work with @vanilla-extract/vite-plugin": "^3.2.1 but works in 2.1.3. #735

Closed
2 tasks done
cpakken opened this issue Jun 19, 2022 · 1 comment · Fixed by #751
Closed
2 tasks done

HMR does not work with @vanilla-extract/vite-plugin": "^3.2.1 but works in 2.1.3. #735

cpakken opened this issue Jun 19, 2022 · 1 comment · Fixed by #751

Comments

@cpakken
Copy link

cpakken commented Jun 19, 2022

Describe the bug

Referenced issued: #578 (Closed but bug still exist)

I'm running "@vanilla-extract/vite-plugin": "^3.2.1" and HMR doesn't seem to be working. Tried switching to version 2.1.3 and HMR works fine.

Basic setup

  • vite react template using pnpm create vite (react-ts option).
  • Substituted .App-header with a vanilla-extract version.
  • switch backgroundColor
  • save
  • See full reload on 3.2.1, and HMR on 2.1.3

Link to repo
https://github.com/cpakken/vite-vanilla-extract-test-hmr-not-working

Reproduction

https://github.com/cpakken/vite-vanilla-extract-test-hmr-not-working

System Info

windows 10

Used Package Manager

pnpm

Logs

No response

Validations

@frandiox
Copy link
Contributor

I noticed this as well. The WS message for HMR often works but the file downloaded by the browser is not updated, so refreshing the browser goes back to the previous state.
I think the reason is that the plugin is not adding the ?t= query string to the file in order to bypass cache.
It should be fixed in #751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants