We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7794452 commit 59cd518Copy full SHA for 59cd518
1 file changed
packages/astro/src/core/build/plugins/plugin-css.ts
@@ -204,6 +204,13 @@ function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[] {
204
)
205
return;
206
207
+ // Delete empty CSS chunks. In prerender these are likely duplicates
208
+ // from SSR.
209
+ if(stylesheet.source.length === 0) {
210
+ delete bundle[id];
211
+ return;
212
+ }
213
+
214
const toBeInlined =
215
inlineConfig === 'always'
216
? true
0 commit comments