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 broken since 2.3.7 #4182
Comments
I updated the issue, the problem starts @ version 2.3.7 |
Not 100% sure if my issue is related to vite itself or the react fast refresh plugin, but I'm getting either I was able to reproduce the bug by switching to Vite 2.3.6 even. You can see my config in this PR where I'm attempting to switch from Webpack to Vite wavebeem/pkmn.help#106 I tested the bug repo. I had to also install autoprefixer, but HMR seemed to work there for me. npm installed Vite 2.4.1. Awesome project though, I can't wait to switch over once HMR is fixed up :) |
I'm seeing the same issue with tailwind (jit mode) since 2.3.7 (likely a duplicate of #4150) : Reproduced in this repo : https://github.com/paraboul/vue-hmr-reload |
For reference: tailwindlabs/tailwindcss#4978 |
AFAIK already fixed post 2.3.8 in 6eaec3a |
Describe the bug
See UPDATE below.
I have pretty big project with nested components.
Basically this is what happened:
v2.3.6 --> HMR OK, everything is working fine
v2.4.0-beta-0 --> HMR not correctly updating a child component (only CSS / tailwind changes, but it doesn't react to html changes in my vue template, i.e: adding text does nothing)
v2.4.0-beta-1 --> HMR is not working anymore when I edit the child component, I got only page reloads, every change triggers a page reload
So I think you introduced or changed something in v2.4.0-beta-0 that breaks HMR in certain circonstances. Then in v2.4.0-beta-1 it always triggers page reloads
Update
Ok, I just tested EVERY build, from 2.2.4 to 2.3.8. Removed yarn.lock and node_modules each time, then yarn install each time.
2.2.4: OK
2.3.5: OK
2.3.6: OK
2.3.7: HMR not working as expected (see below)
2.3.8 to 2.4.1 --> HMR not working as expected
You have introduced something in 2.3.7 that breaks HMR.
Reproduction
I cannot really reproduce because I've 1500+ components and I'm totally lost finding why the HMR fails.
But basically:
But if that page contains a child component (something like /components/Avatar.vue), then it becomes a nightmare: even a simple change to that component triggers nothing (v2.3.7) or systematically triggers a page reload starting with v2.4.0-beta-1 (including v2.4.1)
--> Everything is working fine with vite v2.3.6
--> Since 2.3.7, HRM doesn't update (but not page reload as well)
router.js
I'm using a custom made loader to show a spinner (for code splitting)
loader.js
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: