Home > @fullhuman/postcss-purgecss > UserDefinedOptions
UserDefinedOptions interface
Options used by PurgeCSS to remove unused CSS
Signature:
export interface UserDefinedOptions extends Omit<PurgeCSSUserDefinedOptions, "content" | "css">
Extends: Omit<PurgeCSSUserDefinedOptions, "content" | "css">
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
PurgeCSSUserDefinedOptions["content"] | (Optional) | ||
boolean | (Optional) Keep the selectors extracted from the content files between the CSS files and the runs of the plugin in the process: a content file is only read and extracted again when it changed. Set it to | ||
(sourceFile: string) => Array<string | RawContent> | (Optional) | ||
boolean | DependenciesOptions | (Optional) Add PostCSS dependency messages for the content files and globs, so that the dev servers (Vite, webpack and Rspack with postcss-loader, Next.js, Parcel) run the plugin again when the content changes. Set it to Pass an object to set the root directory of the bundler: the paths outside it get no message. Under Turbopack (Next.js), which stops with an error for a path outside its root, the root defaults to the one Next.js infers (the outermost directory with a workspace marker or a lock file). Set it to the value of |
