Skip to content

Commit

Permalink
fix: css update in ssr mode
Browse files Browse the repository at this point in the history
fix #91, close #92
  • Loading branch information
yyx990803 committed Jun 14, 2023
1 parent 90e90c4 commit 3b7e511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/output/moduleCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function processFile(
seen: Set<File>,
isSSR: boolean
) {
console.log(file.filename, isSSR)
if (seen.has(file)) {
return []
}
Expand Down Expand Up @@ -78,7 +79,7 @@ function processFile(
isSSR
)
// append css
if (!isSSR && file.compiled.css) {
if (file.compiled.css && !isSSR) {
js += `\nwindow.__css__ += ${JSON.stringify(file.compiled.css)}`
}

Expand Down

0 comments on commit 3b7e511

Please sign in to comment.