Skip to content

Commit

Permalink
fix: fixed purgecss config to not strip tailwind classes in production
Browse files Browse the repository at this point in the history
  • Loading branch information
kouts committed Nov 2, 2024
1 parent 0a9900b commit a9f75e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview",
"build-preview": "vite build && vite preview",
"lint": "eslint \"**/*.{vue,ts,js}\"",
"lint-fix": "eslint --fix \"**/*.{vue,ts,js}\"",
"test:unit": "vitest",
Expand Down
2 changes: 2 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export default {
/^router-link(|-exact)-active$/,
/data-v-.*/,
/^active/,
/.*-\[.*\]/, // Matches all classes with `-[...]` (Tailwind JIT classes)
/^(!)?[a-z]+:!?.*/, // Matches responsive and important modifiers, like `md:!text-emerald-500`
],
}),
],
Expand Down

0 comments on commit a9f75e6

Please sign in to comment.