Metalsmith CSS Packer

JSON →
library 0.5.0 ·javascript
verified Jun 4, 2026

Metalsmith plugin that bundles, minifies, and optimizes CSS from HTML files. It scans generated HTML for <link> and <style> tags, merges external and inline stylesheets by media query, and outputs either a single linked .min.css file per media type or inline <style> blocks. Version 0.5.0 wraps the csso minimizer. Use it when you need to process multiple CSS sources after HTML generation. Supports data-packer="exclude" attribute to skip certain elements. The plugin expects HTML files already built by Metalsmith; it does not handle SASS/SCSS compilation natively.