Skip to content

Commit

Permalink
fix: unocss exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Aug 17, 2022
1 parent 8d5be25 commit dffe883
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion unocss.config.ts → uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,31 @@ import {
export default defineConfig({
presets: [presetMini({ dark: "class" }), presetAttributify(), presetUno()],
transformers: [transformerDirectives(), transformerVariantGroup()],
exclude: [`${__dirname}/node_modules/**/*`],
// 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",
Expand Down

0 comments on commit dffe883

Please sign in to comment.