- 更新环境配置文件 - 修改运动员和评分API - 优化登录、评分详情、评分列表等页面 - 更新pages.json和vue.config.js配置 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
56 lines
1.0 KiB
JavaScript
56 lines
1.0 KiB
JavaScript
module.exports = {
|
|
// 输出目录
|
|
outputDir: 'dist/build/h5',
|
|
|
|
// 静态资源目录
|
|
assetsDir: 'static',
|
|
|
|
// 公共路径 - 重要!确保静态资源能正确加载
|
|
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
|
|
|
|
// 生产环境配置
|
|
productionSourceMap: false,
|
|
|
|
// CSS 提取配置
|
|
css: {
|
|
extract: true,
|
|
sourceMap: false
|
|
},
|
|
|
|
// 开发服务器配置
|
|
devServer: {
|
|
port: 8080,
|
|
host: '0.0.0.0',
|
|
open: true,
|
|
overlay: {
|
|
warnings: false,
|
|
errors: true
|
|
},
|
|
proxy: {
|
|
'/mini': {
|
|
target: 'http://localhost:8123',
|
|
changeOrigin: true
|
|
},
|
|
'/martial': {
|
|
target: 'http://localhost:8123',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
|
|
chainWebpack: config => {
|
|
// 禁用 gzip 大小报告
|
|
if (process.env.NODE_ENV === 'production') {
|
|
config.performance.hints(false)
|
|
}
|
|
|
|
// 确保 CSS 文件正确处理
|
|
config.module
|
|
.rule('vue')
|
|
.use('vue-loader')
|
|
.tap(options => {
|
|
return options
|
|
})
|
|
}
|
|
}
|