Skip to content

Commit a403a14

Browse files
committed
fix(content): avoid appending styles if there's no classes
1 parent ae523ad commit a403a14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nuxt-windicss/src/runtime/server/class-extractor.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export default async (nitroApp) => {
1818
...node.props.class.split(' '),
1919
])
2020
})
21-
21+
// only if there's classes to add
22+
if (!utils.classesPending.size)
23+
return
2224
const css = await utils.generateCSS()
2325
// add to the end of the file
2426
file.body.children.push({

0 commit comments

Comments
 (0)