ui_migration lint(style) Add LINT and PURGE to CSS LESS all over WEBAPP

This commit is contained in:
Antonio Anaya 2026-05-07 00:57:11 -06:00
parent fb539e9e8e
commit 72345622e5
4 changed files with 1599 additions and 3 deletions

View file

@ -6,6 +6,7 @@
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import purgecss from '@fullhuman/postcss-purgecss';
// https://vitejs.dev/config/
export default defineConfig({
@ -57,5 +58,18 @@ export default defineConfig({
javascriptEnabled: true,
},
},
postcss: {
plugins: [
purgecss({
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
safelist: {
standard: ['html', 'body'], // Keep basic HTML elements
greedy: [ // greedy works by matching patterns, so we can keep all classes starting with 'uk-' for UIkit
/^uk-/, // Keep all classes starting with 'uk-' (UIkit)
]
},
}),
],
},
},
});