HH-424: clean up Vite build warnings (#80)

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-21 15:06:05 +08:00
committed by GitHub
co-authored by rogee
parent 26d494c6d6
commit 46d63245a1
3 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0" />
<title>GoChat</title>
<link rel="icon" type="image/png" href="/favicon-32x32.png" />
<script src="/runtime-config.js"></script>
<script vite-ignore src="/runtime-config.js"></script>
</head>
<body class="text-slate-600">
<div id="app"></div>
+5 -1
View File
@@ -12,7 +12,11 @@ const assets = [...html.matchAll(/(?:href|src)="(\/assets\/[^"]+)"/g)].map(
);
assert.match(html, /<div id="app"><\/div>/);
assert.match(html, /<script src="\/runtime-config\.js"><\/script>/);
assert.match(html, /<script\s+src="\/runtime-config\.js"><\/script>/);
assert.ok(
html.indexOf('/runtime-config.js') < html.indexOf('type="module"'),
'runtime config must load before the app module'
);
assert.ok(
assets.some(asset => asset.endsWith('.js')),
'missing JS asset'
+2
View File
@@ -151,6 +151,8 @@ export default defineConfig({
},
build: {
outDir: 'dist',
// Dashboard is a 3 MB entry; warn only when it grows beyond that budget.
chunkSizeWarningLimit: 3000,
rollupOptions: {
input: isLibraryMode ? undefined : entrypoints,
output: {