chore(config): 更新生产环境配置和构建设置
- 修复 .env.production 文件中的注释编码问题 - 移除路由守卫中的调试日志输出 - 调整错误处理机制,生产环境静默处理错误 - 移除应用挂载时的调试日志和异常处理包装 - 添加构建配置和基础路径设置
This commit is contained in:
@@ -12,6 +12,17 @@ export default defineConfig({
|
||||
'@': path.resolve(__dirname, 'src')
|
||||
}
|
||||
},
|
||||
// 构建配置
|
||||
build: {
|
||||
outDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
// 确保资源路径正确
|
||||
assetsInlineLimit: 4096,
|
||||
// 生成source map(生产环境可以关闭)
|
||||
sourcemap: false
|
||||
},
|
||||
// 基础路径(如果部署在子目录下需要配置)
|
||||
base: '/',
|
||||
server: {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
|
||||
Reference in New Issue
Block a user