A Node.js package (v0.0.6) that minifies CSS files by removing whitespace and comments, and generates source maps automatically. It recursively processes directories, producing .min.css and .css.map files. No configuration is needed. Unlike full-featured build tools, it is a lightweight, zero-dependency utility for simple CSS minification with source map support. The release cadence is low (version 0.0.6), and it requires Node 20.x.
npm install minify-css-mapNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows programmatic usage: importing minifyCssFile, calling it with a file path, and writing the output CSS and source map files.
Use import statements. If using CommonJS, use dynamic import(): const { minifyCssFile } = await import('minify-css-map');Use path.resolve() or join() to create an absolute path before passing to minifyCssFile.
Ensure you are using Node.js version 20 or higher.
Prefer using the JavaScript API for stability.
Use import { minifyCssFile } from 'minify-css-map'; or dynamic import.Convert to absolute path using path.resolve() before calling minifyCssFile.
Ensure your project is configured for ESM (type: module in package.json) or use dynamic import.
No dependency data recorded yet.