feat(image): 新建knowai-ui:1.0.0镜像并完成推送
- 最终完成16个组件的搭建,覆盖常用组件和布局 - 通过tsc eslint完成测试,vitest测试因未知问题放弃(但保留测试文件) BREAKING CHANGE: 新镜像分支
This commit is contained in:
40
vite.config.ts
Normal file
40
vite.config.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
export default defineConfig({
|
||||
// 插件数组
|
||||
plugins: [vue()],
|
||||
// 路径别名
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'~': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
// 全局引入variable.scss
|
||||
scss: {
|
||||
additionalData: `@import "@/styles/variables.scss";`
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
// 构建为库模式
|
||||
lib: {
|
||||
entry: fileURLToPath(new URL('./src/index.ts', import.meta.url)),
|
||||
name: 'KnowAIUI',
|
||||
fileName: (format) => `knowai-ui.${format}.js`
|
||||
},
|
||||
rollupOptions: {
|
||||
// 不打包进库
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'Vue'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user