Closed hi-ogawa closed 1 month ago
It's already failing! Maybe there is already an issue in v5?
Oh well, it looks like hmr test is also running in test-build
, so it's expected to fail. I added test.skipIf(isBuild)
to skip this. https://github.com/vitejs/vite-plugin-react/pull/326/commits/11250e078a21a826fe47cabfcb7a69b187bafb86
The reason why it was passing before is because untilUpdated
assertion is actually no-op during build:
https://github.com/vitejs/vite-plugin-react/blob/11250e078a21a826fe47cabfcb7a69b187bafb86/playground/test-utils.ts#L92-L97
Thanks a lot @hi-ogawa!
Description
I added a test to check
ssrLoadModule
correctly reflects the same change as client HMR. I verified this fails on6.0.0-alpha.17
but passes on v5. cc @patak-dev @sheremet-vaTechnically this is purely a
ssrLoadModule
concern (probably I can write a similar failing test without React), but I think it's still nice to test it in the context of React SSR (for example, on RSC framework, it also requires framework side code to make sure server side module is invalidated correctly on top ofssrLoadModule
or new module runner).Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).