feat(image): 新建knowai-ui:1.0.0镜像并完成推送

- 最终完成16个组件的搭建,覆盖常用组件和布局
- 通过tsc eslint完成测试,vitest测试因未知问题放弃(但保留测试文件)

BREAKING CHANGE: 新镜像分支
This commit is contained in:
tobegold574
2025-11-14 14:48:18 +08:00
parent 32787bb397
commit b74c01340c
119 changed files with 19719 additions and 0 deletions

40
vite.config.ts Normal file
View 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'
}
}
}
}
})