feat: add unocss config

pull/33/head
xingyu 2023-09-06 16:55:22 +08:00
parent e1c4b5ad5a
commit 5f158ae59d
2 changed files with 14 additions and 4 deletions

View File

@ -5,7 +5,6 @@ import progress from 'vite-plugin-progress'
import purgeIcons from 'vite-plugin-purge-icons' import purgeIcons from 'vite-plugin-purge-icons'
import VitePluginCertificate from 'vite-plugin-mkcert' import VitePluginCertificate from 'vite-plugin-mkcert'
import UnoCSS from 'unocss/vite' import UnoCSS from 'unocss/vite'
import { presetTypography, presetUno } from 'unocss'
import { configPwaConfig } from './pwa' import { configPwaConfig } from './pwa'
import { configHtmlPlugin } from './html' import { configHtmlPlugin } from './html'
import { configCompressPlugin } from './compress' import { configCompressPlugin } from './compress'
@ -21,9 +20,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
// have to // have to
vueJsx(), vueJsx(),
// UnoCSS // UnoCSS
UnoCSS({ UnoCSS(),
presets: [presetUno(), presetTypography()],
}),
// 打包进度条 // 打包进度条
progress(), progress(),
VitePluginCertificate({ VitePluginCertificate({

13
uno.config.ts Normal file
View File

@ -0,0 +1,13 @@
import { defineConfig, presetTypography, presetUno} from 'unocss'
export default defineConfig({
presets: [
presetUno(),
presetTypography(),
],
theme: {
colors: {
primary: '#0960bd',
},
},
})