fix: add custom index.html template with CSS link
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 添加 public/index.html 模板文件,确保 CSS 正确引入 - 更新 manifest.json 添加 template 配置 - 完善 vue.config.js 配置 参考 martial-mini 项目的修复方案
This commit is contained in:
@@ -58,6 +58,7 @@
|
|||||||
"usingComponents" : true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"h5" : {
|
"h5" : {
|
||||||
|
"template": "index.html",
|
||||||
"title" : "武术评分系统",
|
"title" : "武术评分系统",
|
||||||
"router" : {
|
"router" : {
|
||||||
"mode" : "hash",
|
"mode" : "hash",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
|
||||||
<title>武术赛事管理系统</title>
|
<title>武术评分系统</title>
|
||||||
<link rel="stylesheet" href="./static/index.css">
|
<link rel="stylesheet" href="./static/index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -1,5 +1,22 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
// 输出目录
|
||||||
|
outputDir: 'dist/build/h5',
|
||||||
|
|
||||||
|
// 静态资源目录
|
||||||
|
assetsDir: 'static',
|
||||||
|
|
||||||
|
// 生产环境配置
|
||||||
|
productionSourceMap: false,
|
||||||
|
|
||||||
|
// CSS 提取配置
|
||||||
css: {
|
css: {
|
||||||
extract: true
|
extract: true
|
||||||
|
},
|
||||||
|
|
||||||
|
chainWebpack: config => {
|
||||||
|
// 禁用 gzip 大小报告
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
config.performance.hints(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user