An ESBuild plugin that integrates PostCSS processing with support for CSS modules. Current version 0.0.7 is stable but infrequently updated. It allows you to apply PostCSS plugins (e.g., Autoprefixer) and CSS modules within the ESBuild bundler, with options for caching, file filtering, and module configuration. Unlike alternatives (e.g., esbuild-plugin-postcss2), this plugin explicitly supports CSS modules and provides a simple API. However, it has not been updated for over three years and may lack compatibility with newer PostCSS or ESBuild versions.
npm install esbuild-postcss-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin with PostCSS plugin (Autoprefixer) and custom CSS modules naming pattern.
Set `disableCache: true` in plugin options to avoid stale output.
Do not use those options; use ESBuild's own resolve mechanisms instead.
Check compatibility or use an alternative plugin like esbuild-plugin-postcss2.
Enable `esModuleInterop` in tsconfig.json or use `import * as postCSSPlugin`.
Ensure `plugins` is an array of PostCSS plugins: `plugins: [require('autoprefixer')]`.Ensure `modulesFilter` includes your .module.css files, e.g., `modulesFilter: /\.module\.css$/`.
Set correct filter regex: `filter: /\.css$/` or adjust to match your file extensions.