diff --git a/.changeset/allow-empty-output.md b/.changeset/allow-empty-output.md new file mode 100644 index 000000000..98c989c4e --- /dev/null +++ b/.changeset/allow-empty-output.md @@ -0,0 +1,9 @@ +--- +"@node-minify/types": minor +"@node-minify/utils": minor +"@node-minify/cli": minor +--- + +feat: add `allowEmptyOutput` option to skip writing empty output files + +When minifiers produce empty output (e.g., CSS files with only comments), the new `allowEmptyOutput` option allows gracefully skipping the file write instead of throwing a validation error. Also adds `--allow-empty-output` CLI flag. diff --git a/docs/src/components/Pagination.astro b/docs/src/components/Pagination.astro index c88b82737..36571fde2 100644 --- a/docs/src/components/Pagination.astro +++ b/docs/src/components/Pagination.astro @@ -15,7 +15,8 @@ const index = allLinks.findIndex((x) => x.link === cleanPath); // Guard against page not found in sidebar (index === -1) const prev = index > 0 ? allLinks[index - 1] : undefined; -const next = index >= 0 && index < allLinks.length - 1 ? allLinks[index + 1] : undefined; +const next = + index >= 0 && index < allLinks.length - 1 ? allLinks[index + 1] : undefined; ---