ui_migration build(ci) remove csspurge at request on MR
This commit is contained in:
parent
4a9693df31
commit
b6d145daa8
3 changed files with 214 additions and 281 deletions
|
|
@ -6,7 +6,6 @@
|
|||
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({
|
||||
|
|
@ -50,49 +49,13 @@ export default defineConfig({
|
|||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
// Always include math in Less files.
|
||||
math: "always",
|
||||
// Enable relative URLs in Less files.
|
||||
relativeUrls: true,
|
||||
// Enable JavaScript in Less files
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
},
|
||||
postcss: {
|
||||
plugins:
|
||||
process.env.NODE_ENV === "production"
|
||||
? [
|
||||
purgecss({
|
||||
content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"],
|
||||
safelist: {
|
||||
standard: [
|
||||
"html",
|
||||
"body",
|
||||
"svg",
|
||||
"path",
|
||||
"g",
|
||||
"canvas",
|
||||
// Add dynamic UIkit states that JS toggles
|
||||
"uk-active",
|
||||
"uk-open",
|
||||
"uk-modal-page",
|
||||
"uk-offcanvas-page",
|
||||
"uk-preserve-width",
|
||||
],
|
||||
deep: [
|
||||
// Protect UIkit attribute selectors (e.g., [uk-modal])
|
||||
/\[uk-[^\]]+\]/,
|
||||
/\[data-uk-[^\]]+\]/,
|
||||
// Protect Vue transitions
|
||||
/-(leave|enter|appear)(|-(to|from|active))$/,
|
||||
// Protect UIkit dynamic components (notifications, tooltips, sorting)
|
||||
/^uk-notification/,
|
||||
/^uk-tooltip/,
|
||||
/^uk-animation-/,
|
||||
/^uk-transition-/,
|
||||
],
|
||||
// Notice we completely removed the "greedy" block!
|
||||
},
|
||||
}),
|
||||
]
|
||||
: [],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue