|
1 | | -import { defineConfig, mergeConfigs, presetIcons, presetWebFonts } from 'unocss' |
| 1 | +import { createExternalPackageIconLoader } from '@iconify/utils/lib/loader/external-pkg' |
| 2 | +import { |
| 3 | + defineConfig, |
| 4 | + presetAttributify, |
| 5 | + presetIcons, |
| 6 | + presetTypography, |
| 7 | + presetWebFonts, |
| 8 | + presetWind3, |
| 9 | + transformerDirectives, |
| 10 | + transformerVariantGroup, |
| 11 | +} from 'unocss' |
2 | 12 |
|
3 | | -import UnoCSSConfig from '../../uno.config' |
4 | | - |
5 | | -export default defineConfig(mergeConfigs([ |
6 | | - UnoCSSConfig, |
7 | | - { |
8 | | - presets: [ |
9 | | - presetWebFonts({ |
10 | | - fonts: { |
11 | | - sans: 'DM Sans', |
12 | | - serif: 'DM Serif Display', |
13 | | - mono: 'DM Mono', |
14 | | - cute: 'Kiwi Maru', |
15 | | - cuteen: 'Sniglet', |
16 | | - }, |
17 | | - }), |
18 | | - presetIcons({ |
19 | | - scale: 1.2, |
20 | | - }), |
21 | | - ], |
22 | | - // hyoban/unocss-preset-shadcn: Use shadcn ui with UnoCSS |
23 | | - // https://github.com/hyoban/unocss-preset-shadcn |
24 | | - // |
25 | | - // Thanks to |
26 | | - // https://github.com/unovue/shadcn-vue/issues/34#issuecomment-2467318118 |
27 | | - // https://github.com/hyoban-template/shadcn-vue-unocss-starter |
28 | | - // |
29 | | - // By default, `.ts` and `.js` files are NOT extracted. |
30 | | - // If you want to extract them, use the following configuration. |
31 | | - // It's necessary to add the following configuration if you use shadcn-vue or shadcn-svelte. |
32 | | - content: { |
33 | | - pipeline: { |
34 | | - include: [ |
35 | | - // the default |
36 | | - /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/, |
37 | | - // include js/ts files |
38 | | - '(components|src)/**/*.{js,ts}', |
39 | | - ], |
| 13 | +export default defineConfig({ |
| 14 | + presets: [ |
| 15 | + presetWind3(), |
| 16 | + presetAttributify(), |
| 17 | + presetTypography(), |
| 18 | + presetWebFonts({ |
| 19 | + fonts: { |
| 20 | + sans: 'DM Sans', |
| 21 | + serif: 'DM Serif Display', |
| 22 | + mono: 'DM Mono', |
| 23 | + cute: 'Kiwi Maru', |
| 24 | + cuteen: 'Sniglet', |
| 25 | + }, |
| 26 | + }), |
| 27 | + presetIcons({ |
| 28 | + scale: 1.2, |
| 29 | + collections: { |
| 30 | + ...createExternalPackageIconLoader('@proj-airi/lobe-icons'), |
40 | 31 | }, |
| 32 | + }), |
| 33 | + ], |
| 34 | + transformers: [ |
| 35 | + transformerDirectives(), |
| 36 | + transformerVariantGroup(), |
| 37 | + ], |
| 38 | + safelist: 'prose prose-sm m-auto text-left'.split(' '), |
| 39 | + // hyoban/unocss-preset-shadcn: Use shadcn ui with UnoCSS |
| 40 | + // https://github.com/hyoban/unocss-preset-shadcn |
| 41 | + // |
| 42 | + // Thanks to |
| 43 | + // https://github.com/unovue/shadcn-vue/issues/34#issuecomment-2467318118 |
| 44 | + // https://github.com/hyoban-template/shadcn-vue-unocss-starter |
| 45 | + // |
| 46 | + // By default, `.ts` and `.js` files are NOT extracted. |
| 47 | + // If you want to extract them, use the following configuration. |
| 48 | + // It's necessary to add the following configuration if you use shadcn-vue or shadcn-svelte. |
| 49 | + content: { |
| 50 | + pipeline: { |
| 51 | + include: [ |
| 52 | + // the default |
| 53 | + /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/, |
| 54 | + // include js/ts files |
| 55 | + '(components|src)/**/*.{js,ts}', |
| 56 | + ], |
41 | 57 | }, |
42 | 58 | }, |
43 | | -])) |
| 59 | +}) |
0 commit comments