Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
The Nuxt PurgeCSS is a tool that enables you to remove unnecessary CSS from your project. It is designed to be used with Nuxt 2 and Nuxt 3 and offers a simple setup process. With default settings and support for customization, the module makes it easy to optimize your project’s CSS.
To install the Nuxt PurgeCSS module, follow these steps:
Add the nuxt-purgecss dependency to your project by running the following command:
npm install nuxt-purgecss
Once the dependency is installed, add nuxt-purgecss to the modules section of your nuxt.config.js or nuxt.config.ts file:
export default {
modules: [
'nuxt-purgecss',
],
// ...
}
Note: If you are using Nuxt 2, please use version 1 of the module.
The Nuxt PurgeCSS module is a useful tool for optimizing your project’s CSS by removing unused styles. It comes with easy setup and customization options, making it convenient to use with Nuxt 2 and Nuxt 3. With its ability to remove unneeded CSS and its integration with PurgeCSS, the Nuxt PurgeCSS module helps improve the performance and load times of your Nuxt projects.