perf(frontend): import snowfall-effect dynamically to reduce bundle size
This commit is contained in:
parent
b3ab96b5ee
commit
c307dd4fe8
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue