ui: frontend api (#470) [skip-cache]

This commit is contained in:
undefined authored and GitHub committed 2022-12-12 00:53:44 +08:00
1 parent 6d69e88739
commit 96fa6cc7b9
116 files changed
+599 -629

No files matched your search

+4 -3
View File
@@ -46,10 +46,11 @@ document.addEventListener('DOMContentLoaded', async () => {
// eslint-disable-next-line camelcase
try { __webpack_public_path__ = UiContext.cdn_prefix; } catch (e) { }
const [data] = await Promise.all([
(await fetch(`/constant/${UiContext.constantVersion}`, { cache: 'force-cache' })).json(),
await import('./modules'),
const [data, HydroExports] = await Promise.all([
fetch(`/constant/${UiContext.constantVersion}`, { cache: 'force-cache' }).then((r) => r.json()),
import('./api'),
]);
Object.assign(window, { HydroExports });
eval(data[0]); // eslint-disable-line no-eval
data.shift();
window.Hydro.preload = data;