From 85e7a7b4aabc07ba2bd5d8e232958ea1b498d988 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Thu, 1 Aug 2024 18:26:05 +0200 Subject: [PATCH] add tree shaking --- src/routes/home/+page.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/routes/home/+page.svelte b/src/routes/home/+page.svelte index b18a34c5..5b28281f 100644 --- a/src/routes/home/+page.svelte +++ b/src/routes/home/+page.svelte @@ -12,9 +12,18 @@ import { abbreviateNumber, formatDate } from '$lib/utils'; import { numberOfUnreadNotification, screenWidth} from '$lib/store'; - import { Chart } from 'svelte-echarts'; import Lazy from 'svelte-lazy'; + import { Chart } from 'svelte-echarts' + +import { init, use } from 'echarts/core' +import { BarChart } from 'echarts/charts' +import { GridComponent } from 'echarts/components' + + // now with tree-shaking + use([BarChart, GridComponent]) + + export let data; const quickInfo = data?.getDashboard?.quickInfo; @@ -305,7 +314,7 @@ onMount( async() => {
- +