diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index ebcfa24d..2da40591 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -5,7 +5,6 @@ import progress from 'vite-plugin-progress' import purgeIcons from 'vite-plugin-purge-icons' import VitePluginCertificate from 'vite-plugin-mkcert' import UnoCSS from 'unocss/vite' -import { presetTypography, presetUno } from 'unocss' import { configPwaConfig } from './pwa' import { configHtmlPlugin } from './html' import { configCompressPlugin } from './compress' @@ -21,9 +20,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { // have to vueJsx(), // UnoCSS - UnoCSS({ - presets: [presetUno(), presetTypography()], - }), + UnoCSS(), // 打包进度条 progress(), VitePluginCertificate({ diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 00000000..7f5e02ce --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,13 @@ +import { defineConfig, presetTypography, presetUno} from 'unocss' + +export default defineConfig({ + presets: [ + presetUno(), + presetTypography(), + ], + theme: { + colors: { + primary: '#0960bd', + }, + }, +})