Skip to content

Commit 6f1a20f

Browse files
fix: Extra CSS files generated (#777)
* fix: Ensuring duplicate CSS files aren't generated * docs: Adding changeset * Update index.js Co-authored-by: Jason Miller <developit@users.noreply.github.com>
1 parent 0a4cddf commit 6f1a20f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/modern-students-give.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'microbundle': patch
3+
---
4+
5+
Fixing a bug that would cause a CSS file to be generated to match each JS build output

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ function createConfig(options, entry, format, writeMeta) {
458458
// only write out CSS for the first bundle (avoids pointless extra files):
459459
inject: false,
460460
extract:
461+
!!writeMeta &&
461462
options.css !== 'inline' &&
462463
options.output.replace(
463464
/(\.(umd|cjs|es|m))?\.(mjs|[tj]sx?)$/,

0 commit comments

Comments
 (0)