diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-12-21 11:26:41 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-12-21 11:26:41 +0900 |
| commit | c307dd4fe8a48d4b95fea916d7a449a19adee22b (patch) | |
| tree | 8c9bc628a0127ec6becd309d86f971702631ab21 /packages/frontend/src | |
| parent | fix(backend): ロールアサインの通知がある状態でページをリ... (diff) | |
| download | sharkey-c307dd4fe8a48d4b95fea916d7a449a19adee22b.tar.gz sharkey-c307dd4fe8a48d4b95fea916d7a449a19adee22b.tar.bz2 sharkey-c307dd4fe8a48d4b95fea916d7a449a19adee22b.zip | |
perf(frontend): import snowfall-effect dynamically to reduce bundle size
Diffstat (limited to 'packages/frontend/src')
| -rw-r--r-- | packages/frontend/src/boot/main-boot.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index e3fd6d5fca..8826413f45 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -20,7 +20,6 @@ import { mainRouter } from '@/router.js'; import { initializeSw } from '@/scripts/initialize-sw.js'; import { deckStore } from '@/ui/deck/deck-store.js'; import { emojiPicker } from '@/scripts/emoji-picker.js'; -import { SnowfallEffect } from '@/scripts/snowfall-effect.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( @@ -79,6 +78,7 @@ export async function mainBoot() { if (defaultStore.state.enableSeasonalScreenEffect) { const month = new Date().getMonth() + 1; if (month === 12 || month === 1) { + const SnowfallEffect = (await import('@/scripts/snowfall-effect.js')).SnowfallEffect; new SnowfallEffect().render(); } } |