| 12345678910111213141516 |
- import vue from '@vitejs/plugin-vue'
- import UnoCSS from 'unocss/vite'
- import { defineConfig } from 'vite'
- // 发布给业务平台的库构建:UnoCSS 使用 vue-scoped 模式,生成的原子类写进各组件的 scoped 样式,
- // 不会与宿主平台自己的 UnoCSS / Tailwind 类冲突;所有样式汇总到 dist/style.css
- export default defineConfig({
- plugins: [vue(), UnoCSS({ mode: 'vue-scoped' })],
- build: {
- lib: { entry: 'src/index.ts', formats: ['es'], fileName: 'index', cssFileName: 'style' },
- rollupOptions: { external: ['vue', 'markdown-it', '@agent-server/client'] },
- target: 'es2022',
- outDir: 'dist',
- emptyOutDir: true,
- },
- })
|