diff --git a/uno.config.ts b/uno.config.ts index 2167cfd..5783908 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -25,8 +25,15 @@ export default defineConfig({ }, }), ], + /** + * 自定义快捷语句 + * @see https://github.com/unocss/unocss#shortcuts + */ + shortcuts: [['center', 'flex justify-center items-center']], transformers: [ + // 启用 @apply 功能 transformerDirectives(), + // 启用 () 分组功能 // 支持css class组合,eg: `
测试 unocss
` transformerVariantGroup(), ], diff --git a/vite.config.ts b/vite.config.ts index 940646a..8ac3324 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -130,6 +130,7 @@ export default ({ command, mode }) => { // }, // }), ], + css: { postcss: { plugins: [ @@ -150,15 +151,6 @@ export default ({ command, mode }) => { host: '0.0.0.0', hmr: true, port: Number.parseInt(env.VITE_APP_PORT, 10), - // 自定义代理规则 - proxy: { - // 选项写法 - '/api': { - target: 'http://localhost:6666', - changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, ''), - }, - }, }, build: { minify: 'terser',