core&ui: cors (#498)

This commit is contained in:
undefined authored and GitHub committed 2023-01-27 23:22:58 +08:00
1 parent 46eb761079
commit d8f5193a24
10 files changed
+135 -76

No files matched your search

+2 -5
View File
@@ -3,7 +3,6 @@ import * as bus from './bus';
window.Hydro = {
extraPages: [],
preload: [],
components: {},
utils: {},
node_modules: {},
@@ -48,13 +47,11 @@ document.addEventListener('DOMContentLoaded', async () => {
try { __webpack_public_path__ = UiContext.cdn_prefix; } catch (e) { }
const [data, HydroExports] = await Promise.all([
fetch(`/constant/${UiContext.constantVersion}`, { cache: 'force-cache' }).then((r) => r.json()),
fetch(`/constant/${UiContext.constantVersion}.js`).then((r) => r.text()),
import('./api'),
]);
Object.assign(window, { HydroExports });
eval(data[0]); // eslint-disable-line no-eval
data.shift();
window.Hydro.preload = data;
eval(data); // eslint-disable-line no-eval
import('./hydro');
}, false);