From 8c56251d729096b0b4f51bbad2192e0d36bb0f38 Mon Sep 17 00:00:00 2001 From: Developer Date: Sat, 13 Dec 2025 13:51:44 +0800 Subject: [PATCH] fix: add custom index.html template with CSS link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 public/index.html 模板文件,确保 CSS 正确引入 - 更新 manifest.json 添加 template 配置 - 完善 vue.config.js 配置 参考 martial-mini 项目的修复方案 --- manifest.json | 1 + public/index.html | 2 +- vue.config.js | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index fc76d22..8e8aa57 100644 --- a/manifest.json +++ b/manifest.json @@ -58,6 +58,7 @@ "usingComponents" : true }, "h5" : { + "template": "index.html", "title" : "武术评分系统", "router" : { "mode" : "hash", diff --git a/public/index.html b/public/index.html index 3fd040c..d861ffb 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ - 武术赛事管理系统 + 武术评分系统 diff --git a/vue.config.js b/vue.config.js index 9d2099b..4a56c53 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,22 @@ module.exports = { + // 输出目录 + outputDir: 'dist/build/h5', + + // 静态资源目录 + assetsDir: 'static', + + // 生产环境配置 + productionSourceMap: false, + + // CSS 提取配置 css: { extract: true + }, + + chainWebpack: config => { + // 禁用 gzip 大小报告 + if (process.env.NODE_ENV === 'production') { + config.performance.hints(false) + } } }