项目重构: 整理目录结构, 更新前后端代码, 添加测试和数据库迁移

This commit is contained in:
AIGC Developer
2025-12-30 10:24:19 +08:00
parent 5344148a1c
commit 38630dbb66
117 changed files with 1987 additions and 1316 deletions

View File

@@ -58,6 +58,24 @@ export default defineConfig({
// 代码分割优化
rollupOptions: {
output: {
// 为所有资源文件包括SVG生成内容哈希
assetFileNames: (assetInfo) => {
// 获取文件扩展名
const extType = assetInfo.name.split('.').pop();
// 图片类型包括SVG
if (/png|jpe?g|gif|svg|webp|ico/i.test(extType)) {
return `static/images/[name]-[hash][extname]`;
}
// 字体类型
if (/woff2?|eot|ttf|otf/i.test(extType)) {
return `static/fonts/[name]-[hash][extname]`;
}
// 其他资源
return `static/[name]-[hash][extname]`;
},
// JS文件哈希
chunkFileNames: 'static/js/[name]-[hash].js',
entryFileNames: 'static/js/[name]-[hash].js',
manualChunks: {
'vue-vendor': ['vue', 'vue-router', 'pinia'],
'element-plus': ['element-plus', '@element-plus/icons-vue'],