-
-
Notifications
You must be signed in to change notification settings - Fork 186
Description
Tracking for this long time skipped test
vite-plugin-react/packages/plugin-rsc/e2e/basic.test.ts
Lines 849 to 855 in 2a49b23
// TODO: need a way to add/remove links on server hmr. for now, it requires a manually reload. | |
test.skip('adding/removing css server @js', async ({ page }) => { | |
await page.goto(f.url()) | |
await waitForHydration(page) | |
await using _ = await expectNoReload(page) | |
await testAddRemoveCssServer(page, { js: true }) | |
}) |
We could start with full-reload. Then later, make it hmr.
After #841, implementing this might become harder (like we might need to bring back rsc-browser
js virtual again).
We need to know where css is still alive based on module graph. On client, this is taken care via import.meta.hot.prune(() => removeStyle(..))
. https://github.com/vitejs/vite/blob/84079a84ad94de4c1ef4f1bdb2ab448ff2c01196/packages/vite/src/node/plugins/css.ts#L597
There's prune
event but this gets only triggered when importer has import.meta.hot
.
https://github.com/vitejs/vite/blob/84079a84ad94de4c1ef4f1bdb2ab448ff2c01196/packages/vite/src/node/plugins/importAnalysis.ts#L829-L840