From e00b4724ac9f6005fc5cf6d508f8ac3f40804aba Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 14 Jul 2022 22:04:16 +0900 Subject: [PATCH] tweak boot.js --- packages/backend/src/server/web/boot.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index 735708142..b9f00bb21 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -56,12 +56,14 @@ //#endregion //#region Script - import(`/assets/${CLIENT_ENTRY}`) - .catch(async e => { - await checkUpdate(); - console.error(e); - renderError('APP_IMPORT', e); - }) + window.addEventListener('DOMContentLoaded', () => { + import(`/assets/${CLIENT_ENTRY}`) + .catch(async e => { + await checkUpdate(); + console.error(e); + renderError('APP_IMPORT', e); + }); + }); //#endregion //#region Theme