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 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({

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',
},
},
})