A CSS minifier that is tiny and very fast, removing most unnecessary whitespace to achieve ~95% of the compression of full-blown minifiers in ~5% of the time. Current stable version is 2.0.1. It ships TypeScript type definitions. Compared to alternatives like csso or clean-css, this package prioritizes simplicity and speed over maximum compression, making it ideal for development workflows or where quick minification is needed. It is actively maintained with a focused feature set.
npm install css-simple-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing and using the default export to minify a CSS string, preserving property values but removing unnecessary whitespace.
Use import or dynamic import() instead of require(). If you must use CommonJS, stay on v1.x.
If you need full CSS minification, consider using csso or clean-css instead.
Use default import: import minify from 'css-simple-minifier'.
Replace const minify = require('css-simple-minifier') with import minify from 'css-simple-minifier' or const minify = (await import('css-simple-minifier')).default.Change to import minify from 'css-simple-minifier' (default import).
Use default import instead of named import.
No dependency data recorded yet.