Transform CSS consistently across extension pages and content scripts with one pipeline. PostCSS is ideal when you need plugins like Autoprefixer or modern CSS transforms.
Extension.js detects PostCSS config and applies postcss-loader when needed.
| Capability | What it gives you |
|---|---|
| Shared CSS pipeline | Use the same transforms across popup, options, new tab, and content scripts |
| Flexible config discovery | Load PostCSS config from dedicated files or package.json |
| Tailwind compatibility | Works with Tailwind-based setups through PostCSS plugins |
| Plugin-based transforms | Add tools like autoprefixer and postcss-preset-env |
Use this template when you want a working PostCSS setup with Tailwind and component-driven UI.

Repository: examples/sidebar-shadcn
Extension.js checks these PostCSS config files:
.postcssrc.postcssrc.json.postcssrc.yaml.postcssrc.ymlpostcss.config.mjs.postcssrc.js / .postcssrc.cjspostcss.config.js / postcss.config.cjsIt also recognizes postcss config in package.json.
Install PostCSS dependencies:
postcss.config.jsImport styles normally in extension pages:
For content scripts, import the same way in your content-script entry:
Extension.js applies PostCSS in both contexts; the output packaging differs (css pipeline for pages, asset pipeline for content scripts).
autoprefixer, postcss-preset-env)..mjs/.cjs) matches your project module type.