Skip to content
Snippets Groups Projects
Commit c307dd4f authored by syuilo's avatar syuilo
Browse files

perf(frontend): import snowfall-effect dynamically to reduce bundle size

parent b3ab96b5
No related branches found
Tags 10.99.0
No related merge requests found
......@@ -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();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment