diff --git a/.changeset/modern-students-give.md b/.changeset/modern-students-give.md new file mode 100644 index 00000000..c4e83ffc --- /dev/null +++ b/.changeset/modern-students-give.md @@ -0,0 +1,5 @@ +--- +'microbundle': patch +--- + +Fixing a bug that would cause a CSS file to be generated to match each JS build output diff --git a/src/index.js b/src/index.js index 30244f05..6ec0238a 100644 --- a/src/index.js +++ b/src/index.js @@ -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?)$/,