Skip to content

Commit

Permalink
fix: Extra CSS files generated (#777)
Browse files Browse the repository at this point in the history
* fix: Ensuring duplicate CSS files aren't generated

* docs: Adding changeset

* Update index.js

Co-authored-by: Jason Miller <developit@users.noreply.github.com>
  • Loading branch information
rschristian and developit authored May 27, 2021
1 parent 0a4cddf commit 6f1a20f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-students-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'microbundle': patch
---

Fixing a bug that would cause a CSS file to be generated to match each JS build output
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ function createConfig(options, entry, format, writeMeta) {
// only write out CSS for the first bundle (avoids pointless extra files):
inject: false,
extract:
!!writeMeta &&
options.css !== 'inline' &&
options.output.replace(
/(\.(umd|cjs|es|m))?\.(mjs|[tj]sx?)$/,
Expand Down

0 comments on commit 6f1a20f

Please sign in to comment.