feat: add unocss config
parent
e1c4b5ad5a
commit
5f158ae59d
|
@ -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({
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { defineConfig, presetTypography, presetUno} from 'unocss'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
presets: [
|
||||||
|
presetUno(),
|
||||||
|
presetTypography(),
|
||||||
|
],
|
||||||
|
theme: {
|
||||||
|
colors: {
|
||||||
|
primary: '#0960bd',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
Loading…
Reference in New Issue