perf(frontend): optimize initial bundle size with lazy-loaded dialogs and localized chart providers (#1110)
This commit is contained in:
@@ -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']
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user