esbuild-plugin-tailwindcss
Version:
Esbuild plugin for TailwindCSS
32 lines (28 loc) • 1.04 kB
text/typescript
import { Plugin } from 'esbuild';
import { AcceptedPlugin } from 'postcss';
interface TailwindPluginOptions {
/**
* Custom PostCSS plugins to prepend or append to the default plugin chain.
*/
postcssPlugins?: {
/** Plugins to add before Tailwind and Autoprefixer. */
prepend?: AcceptedPlugin[];
/** Plugins to add after Tailwind and Autoprefixer. */
append?: AcceptedPlugin[];
/** Disable applying the Autoprefixer plugin. Defaults to `false`. */
disableAutoprefixer?: boolean;
};
/**
* CSS Modules configuration.
*/
cssModules?: {
/** Enable CSS Modules. Defaults to `true`. */
enabled?: boolean;
/** Regex to identify CSS Module files. Defaults to `/\.module\.css$/`. */
filter?: RegExp;
/** Regex patterns to exclude files from CSS Modules. */
exclude?: RegExp[];
};
}
declare const tailwindPlugin: (options?: TailwindPluginOptions) => Plugin;
export { tailwindPlugin as default, tailwindPlugin };