JavaScript API
Last updated
Last updated
Start by installing PurgeCSS as a dev dependency.
You can now use PurgeCSS inside a JavaScript file.
In the following examples, the options passed to PurgeCSS are the same as the ones . The result purgecssResult
is an array of an object containing the name of the files with the purged CSS.
The format of purgecssResult is