PurgeCSSPurgeCSS
API Reference
GitHub
API Reference
GitHub
  • PurgeCSS

    • About PurgeCSS
    • Getting Started
    • Configuration
    • Command Line Interface
    • Programmatic API
    • Safelisting
    • Extractors
  • Plugins

    • PostCSS
    • Webpack
    • Gulp
    • Grunt
    • Gatsby
  • Guides

    • Vue
    • React
    • Next.js
    • Nuxt.js
    • Razzle
    • WordPress
    • Hugo
  • Comparison
  • Common Questions

    • How to use with CSS modules
    • How to use with Ant Design

Home > purgecss > PurgeCSS > getPurgedCSS

PurgeCSS.getPurgedCSS() method

Get the purged version of the css based on the files

Signature:

getPurgedCSS(cssOptions: Array<string | RawCSS>, selectors: ExtractorResultSets): Promise<ResultPurge[]>;

Parameters

Parameter

Type

Description

cssOptions

Array<string | RawCSS>

css options, files or raw strings

selectors

ExtractorResultSets

set of extracted css selectors

**Returns:**

Promise<ResultPurge[]>

Edit this page