Build Tool Integrations

While PurifyCSS can be used as a standalone library or CLI tool, its true power is unleashed when integrated directly into an automated build process. This ensures that your CSS is always optimized with each build without manual intervention.

Official plugins are available for the most popular JavaScript build tools.

Webpack

For projects using Webpack, the purifycss-webpack-plugin is the recommended solution. It seamlessly hooks into the Webpack build lifecycle to purify your CSS.

Gulp

If your project uses Gulp for task automation, you can use gulp-purifycss to add a purification step to your Gulp streams.

Grunt

For projects built with Grunt, grunt-purifycss provides a configurable task to handle CSS purification.

Please refer to the documentation in each plugin's repository for specific installation and configuration instructions.