UNPKG

@pandell/postcss-config

Version:
41 lines (40 loc) 1.45 kB
import type { AcceptedPlugin } from "postcss"; import type { Options } from "postcss-mixins"; /** * Settings for PostCSS plugins. */ export interface PostcssPluginSettings { /** * If true, auto-prefixer will be disabled when generating CSS. */ readonly disableAutoPrefixer?: boolean; /** * Object mapping mixin names to functions. * * Mixins will be globally available when processing CSS files (no @import required). */ readonly mixins?: Options["mixins"]; /** * Object mapping variable names to values. * * Variables will be globally available when processing CSS files (no @import required). */ readonly variables?: { [name: string]: string | number; }; /** * List of extra plugins to append to the end of the array returned from {@link defaultPostcssPlugins}. */ readonly extraPlugins?: AcceptedPlugin[]; } /** * Creates an array of PostCSS plugins with the given settings. * The default plugins are `postcss-mixins`, `postcss-preset-env`, and `postcss-calc`. * * @param settings * Settings controlling CSS file processing. * @returns * An array of PostCSS plugins. This array can be used anywhere PostCSS configuration can * be specified - e.g. `postcss.config.mjs` file, Webpack configuration, Vite configuration. */ export declare function defaultPostcssPlugins(settings: PostcssPluginSettings): AcceptedPlugin[];