Skip to content

Commit 10987e0

Browse files
committed
refactor(rsc): use addWatchFile to invalidate server css virtual
1 parent 2b7b90f commit 10987e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/plugin-rsc/src/plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,6 +2100,7 @@ function vitePluginRscCss(
21002100
if (parsed?.type === 'rsc') {
21012101
assert(this.environment.name === 'rsc')
21022102
const importer = parsed.id
2103+
this.addWatchFile(importer)
21032104
if (this.environment.mode === 'dev') {
21042105
const result = collectCss(server.environments.rsc!, importer)
21052106
const cssHrefs = result.hrefs.map((href) => href.slice(1))
@@ -2124,6 +2125,7 @@ function vitePluginRscCss(
21242125
}
21252126
},
21262127
hotUpdate(ctx) {
2128+
if (1) return
21272129
if (this.environment.name === 'rsc') {
21282130
const { server } = manager
21292131
const mods = collectModuleDependents(ctx.modules)

0 commit comments

Comments
 (0)