Skip to content

Commit 23fd022

Browse files
committed
fix(rsc): fix FOUC of lazy component css within client boundary
1 parent 83a5741 commit 23fd022

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
@@ -1495,6 +1495,8 @@ function collectAssetDepsInner(
14951495
assert(v, `Not found '${k}' in the bundle`)
14961496
if (v.type === 'chunk') {
14971497
css.push(...(v.viteMetadata?.importedCss ?? []))
1498+
// TODO: for client references, aggressively collect to surface css at client boundary for SSR.
1499+
v.dynamicImports
14981500
for (const k2 of v.imports) {
14991501
// server external imports is not in bundle
15001502
if (k2 in bundle) {

0 commit comments

Comments
 (0)