fix: (regression beta) some 404 errors while loading admin-panel
Massimo Melina committed
Jun 29, 2026 at 17:30 UTC
2e76708b183b663f147a226dc2fa1366c2b53bd9
1 file changed
+1
-1
src/serveGuiFiles.ts
+1
-1
@@ -66,7 +66,7 @@ function adjustBundlerLinks(ctx: Koa.Context, uri: string, data: string | Buffer
66
const filesUri = ctx.state.revProxyPath + uri
67
return ext && !ext.match(/\.(css|html|js|ts|scss)/) ? data
68
: String(data).replace(/((?:import[ (]| from )['"])\//g, `$1${filesUri}`)
69
- .replace(/(assetsURL=function\(([^)]+)\)\{return)"\/"\+\2\}/g, `$1${JSON.stringify(filesUri)}+$2}`) // vite's preload helper uses the configured absolute base for dependency hints
69
+ .replace(/(=function\(([\w$]+)\)\{return)[`'"]\/[`'"]\+\2\}/g, `$1${JSON.stringify(filesUri)}+$2}`) // vite's preload helper uses the configured absolute base for dynamic dependency hints
70
}
71
72
const getFaviconTimestamp = debounceAsync(async () => {