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 is not working under certain circumstances (difficult to pin point the exact context) / patching issue #1626

Closed
AlexandreBonaventure opened this issue Jul 19, 2020 · 1 comment
Labels
🐞 bug Something isn't working scope: hmr

Comments

@AlexandreBonaventure
Copy link
Contributor

AlexandreBonaventure commented Jul 19, 2020

Version

3.0.0-rc.1

Reproduction link

https://github.com/AlexandreBonaventure/vue-hmr-vfor-bug

Steps to reproduce

https://github.com/AlexandreBonaventure/vue-hmr-vfor-bug/blob/master/README.md

So with my team we've been noticing that in the last couple of vue/vite versions HMR was really not working anymore for us. Often times it gives cryptic errors in the console and difficult ro reproduce consistently. It is probably due to multiple reasons but I managed to isolate a bug at least. I had an insanely hard time to make a minimal repro out of it because it seems really flaky but on my machine this minimal repro is failing everytime.
So yeah, sorry you might see some stuff there that seems really randomly put but I swear, if you remove one single line the bug does not show anymore XD

Just this single bug makes HMR broken and unusable for us.

I can provide machine specific info if you guys can't reproduce.


@yyx990803
Copy link
Member

yyx990803 commented Jul 19, 2020

Most likely caused by 5f61aa0

What you can do now: specify

vueCompilerOptioons: {
  hoistStatic: process.env.NODE_ENV === 'production'
}

in your vite config.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: hmr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants