what is vite-plugin-purgecss-v2
vite-plugin-purgecss-v2 is a plugin of vite,to tree shaking css.
support for any framework!!!
the name of
vite-plugin-purgecss-v2
andvite-plugin-purgecss
is very similar,butvite-plugin-purgecss
can not fit my expect andvite-plugin-purgecss
discontinued updates,so create a new pluginvite-plugin-purgecss-v2
to replacevite-plugin-purgecss
.
usage
-
install:
npm i vite-plugin-purgecss-v2 -D
-
usage:
// vite.config.js import { defineConfig } from 'vite' import purgecss from 'vite-plugin-purgecss-v2'; // https://vitejs.dev/config/ export default defineConfig({ // ... plugins: [ purgecss() ] });