更新项目代码:新增彩种模块、组件优化、管理后台功能完善

This commit is contained in:
lihanqi
2026-02-13 17:43:41 +08:00
parent d395295aa0
commit 3d7358079a
146 changed files with 48171 additions and 8804 deletions

View File

@@ -16,5 +16,37 @@ export default defineConfig({
server: {
host: '0.0.0.0', // 允许局域网访问
port: 5173
},
build: {
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
},
// 生成带hash的文件名避免浏览器缓存
rollupOptions: {
output: {
// 入口文件名
entryFileNames: 'assets/js/[name].[hash].js',
// 代码分割文件名
chunkFileNames: 'assets/js/[name].[hash].js',
// 资源文件名
assetFileNames: (assetInfo) => {
// 根据文件类型分目录存放
if (assetInfo.name.endsWith('.css')) {
return 'assets/css/[name].[hash].[ext]'
}
if (/\.(png|jpe?g|gif|svg|webp|ico)$/.test(assetInfo.name)) {
return 'assets/images/[name].[hash].[ext]'
}
if (/\.(woff2?|eot|ttf|otf)$/.test(assetInfo.name)) {
return 'assets/fonts/[name].[hash].[ext]'
}
return 'assets/[name].[hash].[ext]'
}
}
}
}
})
})