We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa60efd commit cf1d104Copy full SHA for cf1d104
packages/plugin-rsc/src/plugin.ts
@@ -479,14 +479,12 @@ export default function vitePluginRsc(
479
},
480
async hotUpdate(ctx) {
481
if (isCSSRequest(ctx.file)) {
482
- // keep default behavior for css with `?url` query, which uses `?direct` for HMR
483
- if (ctx.modules.find((m) => m.id && urlRE.test(m.id))) {
484
- return
485
- }
486
if (this.environment.name === 'client') {
487
// filter out `.css?direct` (injected by SSR) to avoid browser full reload
488
// when changing non-self accepting css such as `module.css`.
489
- return ctx.modules.filter((m) => !m.id?.includes('?direct'))
+ return ctx.modules.filter(
+ (m) => !(m.id?.includes('?direct') && !m.isSelfAccepting),
+ )
490
}
491
492
0 commit comments