Skip to content

Commit 9d1d35e

Browse files
committed
refactor!: 移除 vite-plugin-html 插件
1 parent 431da52 commit 9d1d35e

10 files changed

Lines changed: 202 additions & 323 deletions

File tree

index.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" href="/favicon.ico" />
6+
<link rel="stylesheet" href="/loading.css" />
67
<link rel="stylesheet" href="/browser_upgrade/index.css" />
78
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
89
<title>%VITE_APP_TITLE%</title>
9-
<%- copyrightScript %>
1010
</head>
1111
<body>
1212
<div id="app">
@@ -17,7 +17,7 @@
1717
<div class="square"></div>
1818
<div class="square"></div>
1919
</div>
20-
<div class="text">载入中</div>
20+
<div class="text">载入中</div>
2121
</div>
2222
<div id="browser-upgrade">
2323
<div class="title">为了您的体验,推荐使用以下浏览器</div>
@@ -33,8 +33,11 @@
3333
</div>
3434
</div>
3535
</div>
36-
<%- loadingScript %>
36+
<script>
37+
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
38+
document.getElementById('browser-upgrade').style.display = 'block'
39+
}
40+
</script>
3741
<script type="module" src="/src/main.ts"></script>
38-
<%- devtoolScript %>
3942
</body>
4043
</html>

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
"axios": "^1.4.0",
2424
"dayjs": "^1.11.7",
2525
"element-plus": "^2.3.5",
26+
"eruda": "^3.0.0",
2627
"hotkeys-js": "^3.10.2",
2728
"lodash-es": "^4.17.21",
2829
"mitt": "^3.0.0",
2930
"mockjs": "^1.1.0",
3031
"pinia": "^2.1.3",
3132
"qs": "^6.11.2",
33+
"vconsole": "^3.15.0",
3234
"vue": "^3.3.4",
3335
"vue-router": "^4.2.1"
3436
},
@@ -66,7 +68,6 @@
6668
"vite": "^4.3.8",
6769
"vite-plugin-banner": "^0.7.0",
6870
"vite-plugin-compression": "^0.5.1",
69-
"vite-plugin-html": "^3.2.0",
7071
"vite-plugin-mock": "^2.9.6",
7172
"vite-plugin-restart": "^0.3.1",
7273
"vite-plugin-spritesmith": "^0.1.1",

0 commit comments

Comments
 (0)