use import
This commit is contained in:
parent
8a850fbe6b
commit
77fef4ee23
|
@ -58,14 +58,11 @@
|
||||||
? `?salt=${localStorage.getItem('salt')}`
|
? `?salt=${localStorage.getItem('salt')}`
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
const script = document.createElement('script');
|
import(`/assets/${CLIENT_ENTRY}${salt}`)
|
||||||
script.setAttribute('src', `/assets/${CLIENT_ENTRY}${salt}`);
|
.catch(async () => {
|
||||||
script.setAttribute('type', 'module');
|
await checkUpdate();
|
||||||
script.addEventListener('error', async () => {
|
renderError('APP_FETCH_FAILED');
|
||||||
await checkUpdate();
|
});
|
||||||
renderError('APP_FETCH_FAILED');
|
|
||||||
});
|
|
||||||
document.head.appendChild(script);
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Theme
|
//#region Theme
|
||||||
|
|
Loading…
Reference in New Issue