-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
feat: invalidate message and fix HMR for HOC, class component & styled components #79
Conversation
5bf98f0
to
e20e791
Compare
e20e791
to
d8cf659
Compare
Available in v3.1.0-beta.0! |
v4.1.0-beta.0 I assume ;) I ran into some styled component theming causing a full refresh. Upgraded to the 4.1.0-beta.0 and the issue is fixed ! Awesome work ! |
The plugin version is v3.1.0-beta.0, but it requires to bump Vite to v4.1.0-beta.0! |
I just ran the VPS test suite and the HMR tests are passing. |
Amazing work! waiting for a release |
This should be released this week when Vite 4.1 is stable |
@ArnaudBarre how does one upgrade it to the latest version so I don't get an error with ReactRefresh? |
This available with the version 3.1 (requires Vite 4.1) |
It seems to be not resolved still in current stable version (4.1.0) |
Are you using v3.1? |
vitejs/plugin-react - 3.1.0 |
|
vite: 4.2.1 |
Hey this is not the right place to report a bug. (And this PR has nothing to do with this bug). First try to reproduce the issue from a fresh template on stackblitz & then open a new issue with a link to it. |
I am having this issue |
I need to embed html, the new installation tests' @vitejs/plugin-react 'and' @vitejs/plugin-react-swc ' (separate). As well as tested' @vitejs/plugin-vue '. I used'pnpm dev' for each of the three projects. Runs correctly without errors. I use them in'index.html 'with three default code cases:' @vitejs/plugin-vue 'without any errors.' @vitejs/plugin-react 'and' @vitejs/plugin-react-swc 'have errors.
|
I just setup a new Vite project with the Demo: I've created a demo https://github.com/bsodmike/vitejs-react-plugin-error-troubleshoot-public/ Ideas? |
@ArnaudBarre I've created a demo https://github.com/bsodmike/vitejs-react-plugin-error-troubleshoot-public/tree/master - I wonder if you could take a look please? |
@bsodmike Please avoid using a PR comment for questions and create a new issue instead. |
Apologies, yes, it was an errant service worker. I have no idea what caused that to be installed. Will look into this, thanks |
still facing issue in 4.3.4 |
Fixes all known HMR issues (fix #26, fix #6, fix #21, fix #11, fix #8, fix #20).
The SWC plugin also add an issue in the case of "hidden" component (like styled components), fixed in vitejs/vite-plugin-react-swc@954793d (available in 3.1.0-beta.2)
Instead of backporting only the fix, I did what I didn't have time to do before v3: using a more precise validate boundary check and adding invalidate message.
Because of a change in comment handling in esbuild, we need to add Vite 4.1 as a peer dependency to include esbuild > 0.16.14. This requires a bump of rollup and TS, that are removed of the exclude list of renovate at the same time, doesn't seem required for this small codebase.