Disable inlineCriticalCss by default for better SSR performance

This commit is contained in:
Tim Donohue
2024-04-15 16:13:41 -05:00
parent 0a1764c65a
commit ee174747c2
4 changed files with 10 additions and 8 deletions

View File

@@ -14,8 +14,10 @@ export interface SSRConfig extends Config {
enablePerformanceProfiler: boolean;
/**
* Reduce render blocking requests by inlining critical CSS.
* Defaults to true.
* When set to true, reduce render blocking requests by inlining critical CSS.
* Determining which styles are critical can be an expensive operation;
* this option can be disabled to boost server performance at the expense of loading smoothness.
* For improved SSR performance, DSpace defaults this to false (disabled).
*/
inlineCriticalCss: boolean;
}

View File

@@ -3,10 +3,10 @@ import { BuildConfig } from '../config/build-config.interface';
export const environment: Partial<BuildConfig> = {
production: true,
// Angular SSR settings
// Angular SSR (Server Side Rendering) settings
ssr: {
enabled: true,
enablePerformanceProfiler: false,
inlineCriticalCss: true,
inlineCriticalCss: false,
},
};

View File

@@ -7,11 +7,11 @@ import { NotificationAnimationsType } from '../app/shared/notifications/models/n
export const environment: BuildConfig = {
production: false,
// Angular SSR settings
// Angular SSR (Server Side Rendering) settings
ssr: {
enabled: true,
enablePerformanceProfiler: false,
inlineCriticalCss: true,
inlineCriticalCss: false,
},
// Angular express server settings.

View File

@@ -8,11 +8,11 @@ import { BuildConfig } from '../config/build-config.interface';
export const environment: Partial<BuildConfig> = {
production: false,
// Angular SSR settings
// Angular SSR (Server Side Rendering) settings
ssr: {
enabled: false,
enablePerformanceProfiler: false,
inlineCriticalCss: true,
inlineCriticalCss: false,
},
};