A minimal CSS Modules plugin for esbuild, version 1.2.6, forked from esbuild-plugin-simple-css-modules. It uses PostCSS as its sole dependency to transform CSS Module files (.module.css) into scoped class names and IDs, appending a hash of the filepath by default. Supports animation names, multiple selectors, and custom transform callbacks. Compatible with esbuild >=0.14.x and Node >=14.x. Ships TypeScript type definitions.
npm install esbuild-plugin-cssmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic esbuild setup using the cssm plugin to process CSS Modules in .module.css files.
Configure only this plugin for .module.css files, or use esbuild's loader to exclude them.
Clamp hashLength to 28 or upgrade to latest version which may enforce this.