perf(frontend): optimize initial bundle size with lazy-loaded dialogs and localized chart providers (#1110)

This commit is contained in:
brios
2026-05-18 23:05:10 +02:00
committed by GitHub
parent 4afc738dd4
commit c6cbdcfa11
32 changed files with 532 additions and 405 deletions
@@ -25,6 +25,9 @@ interface ChartConfig {
category: string;
}
import {provideCharts, withDefaultRegisterables} from 'ng2-charts';
import ChartDataLabels from 'chartjs-plugin-datalabels';
@Component({
selector: 'app-library-stats',
standalone: true,
@@ -44,6 +47,7 @@ interface ChartConfig {
ReadingJourneyChartComponent,
TranslocoDirective
],
providers: [provideCharts(withDefaultRegisterables(ChartDataLabels))],
templateUrl: './library-stats.component.html',
styleUrls: ['./library-stats.component.scss']
})
@@ -29,6 +29,9 @@ import {PublicationEraChartComponent} from './charts/publication-era-chart/publi
import {SessionArchetypesChartComponent} from './charts/session-archetypes-chart/session-archetypes-chart.component';
import {UserChartConfig, UserChartConfigService} from './service/user-chart-config.service';
import {provideCharts, withDefaultRegisterables} from 'ng2-charts';
import ChartDataLabels from 'chartjs-plugin-datalabels';
@Component({
selector: 'app-user-stats',
standalone: true,
@@ -61,6 +64,7 @@ import {UserChartConfig, UserChartConfigService} from './service/user-chart-conf
SessionArchetypesChartComponent,
TranslocoDirective
],
providers: [provideCharts(withDefaultRegisterables(ChartDataLabels))],
templateUrl: './user-stats.component.html',
styleUrls: ['./user-stats.component.scss']
})