PostCSS tagged template literals plugin for esbuild (v0.2.1). Enables processing CSS-in-JS tagged template literals (e.g., css`...`) through PostCSS pipelines during esbuild builds. Integrates with postcss-load-config for plugin configuration (e.g., postcss-nesting). Provides options like filter, namespace, tag name, and minify. Requires esbuild ^0.9.0, postcss ^8.0.0, and postcss-load-config ^3.0.0 as peer dependencies. Different from other PostCSS esbuild plugins by focusing specifically on template literals rather than CSS files.
npm install esbuild-plugin-postcss-literalNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: import plugin, add to esbuild build plugins array. Requires postcss-load-config or inline config.
Use explicit filter and tag options to avoid unintended processing.
Set minify: false and handle minification separately if needed.
Run npm install esbuild postcss postcss-load-config --save-dev.
Add 'dom' to lib array in tsconfig.json.
Install postcss-load-config via npm install postcss-load-config --save-dev.
Create a .postcssrc file or pass config option to postcssLiteral().
Ensure plugin filter only matches files that contain template literals (e.g., filter: /\.js$/).
Use import postcssLiteral from 'esbuild-plugin-postcss-literal' (default import).