> For the complete documentation index, see [llms.txt](https://v1.purgecss.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v1.purgecss.com/with-rollup.md).

# With Rollup

Start by installing the Rollup plugin as a dev dependency.

```
npm i -D rollup-plugin-purgecss
```

```javascript
import { rollup } from 'rollup'
import purgecss from 'rollup-plugin-purgecss'

rollup({
  entry: 'main.js',
  plugins: [
    purgecss({
      content: ['index.html']
    })
  ]
})
```
