mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-09 14:40:27 +08:00
fix: unocss exclude
This commit is contained in:
58
uno.config.ts
Normal file
58
uno.config.ts
Normal file
@@ -0,0 +1,58 @@
|
||||
import {
|
||||
transformerVariantGroup,
|
||||
transformerDirectives,
|
||||
presetAttributify,
|
||||
defineConfig,
|
||||
presetMini,
|
||||
presetUno
|
||||
} from "unocss";
|
||||
|
||||
// https://github.com/unocss/unocss#readme
|
||||
export default defineConfig({
|
||||
presets: [presetMini({ dark: "class" }), presetAttributify(), presetUno()],
|
||||
transformers: [transformerDirectives(), transformerVariantGroup()],
|
||||
// unocss默认不扫描 node_modules、dist、css以及其扩展 具体实现:https://github.com/unocss/unocss/blob/03c8abe8f5020b3baaed3dfbfe8e2258dd041a7e/packages/vite/src/utils.ts#L3
|
||||
exclude: [
|
||||
"node_modules",
|
||||
"dist",
|
||||
".git",
|
||||
".github",
|
||||
".husky",
|
||||
".vscode",
|
||||
"build",
|
||||
"locales",
|
||||
"mock",
|
||||
"public",
|
||||
"types",
|
||||
".eslintrc.js",
|
||||
".prettierrc.js",
|
||||
"postcss.config.js",
|
||||
"stylelint.config.js",
|
||||
"commitlint.config.js",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"README.en-US.md",
|
||||
"CHANGELOG.en_US.md",
|
||||
"CHANGELOG.zh_CN.md",
|
||||
/\.(css|postcss|sass|scss|less|stylus|styl)$/
|
||||
],
|
||||
shortcuts: {
|
||||
"bg-dark": "bg-bg_color",
|
||||
"wh-full": "w-full h-full",
|
||||
"cp-on": "cursor-pointer outline-none",
|
||||
"flex-c": "flex justify-center items-center",
|
||||
"flex-ac": "flex justify-around items-center",
|
||||
"flex-bc": "flex justify-between items-center",
|
||||
"navbar-bg-hover": "dark:color-white !dark:hover:bg-[#242424]"
|
||||
},
|
||||
theme: {
|
||||
colors: {
|
||||
bg_color: "var(--el-bg-color)",
|
||||
primary: "var(--el-color-primary)",
|
||||
primary_light_9: "var(--el-color-primary-light-9)",
|
||||
text_color_primary: "var(--el-text-color-primary)",
|
||||
text_color_regular: "var(--el-text-color-regular)",
|
||||
text_color_disabled: "var(--el-text-color-disabled)"
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user