Purgecss
Github
Search…
Introduction
Configuration
CLI
JavaScript API
With Webpack
With PostCSS
With Gulp
With Grunt
With Rollup
Whitelisting
Extractors
Comparison
Guides
Powered By
GitBook
With Rollup
Start by installing the Rollup plugin as a dev dependency.
1
npm i -D rollup-plugin-purgecss
Copied!
1
import
{
rollup
}
from
'rollup'
2
import
purgecss
from
'rollup-plugin-purgecss'
3
4
rollup
({
5
entry
:
'main.js'
,
6
plugins
:
[
7
purgecss
({
8
content
:
[
'index.html'
]
9
})
10
]
11
})
Copied!
Previous
With Grunt
Next
Whitelisting
Last modified
4yr ago
Copy link