Skip to content

Commit 9f05179

Browse files
authored
perf(css): skip renderChunk when no CSS has been collected (#967)
1 parent 742f314 commit 9f05179

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/css/src/post.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export function CssPostPlugin(
3333
name: 'tsdown:css-post',
3434

3535
renderChunk(_code, chunk) {
36+
if (styles.size === 0) return
3637
if (config.splitting) return
3738

3839
let chunkCSS = ''

0 commit comments

Comments
 (0)