Skip to content

Commit 782352d

Browse files
authored
Merge pull request DSpace#2944 from tdonohue/disable_inline_css
Disable `inlineCriticalCss` by default for better SSR performance
2 parents f59510d + ee17474 commit 782352d

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/config/ssr-config.interface.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ export interface SSRConfig extends Config {
1414
enablePerformanceProfiler: boolean;
1515

1616
/**
17-
* Reduce render blocking requests by inlining critical CSS.
18-
* Defaults to true.
17+
* When set to true, reduce render blocking requests by inlining critical CSS.
18+
* Determining which styles are critical can be an expensive operation;
19+
* this option can be disabled to boost server performance at the expense of loading smoothness.
20+
* For improved SSR performance, DSpace defaults this to false (disabled).
1921
*/
2022
inlineCriticalCss: boolean;
2123
}

src/environments/environment.production.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { BuildConfig } from '../config/build-config.interface';
33
export const environment: Partial<BuildConfig> = {
44
production: true,
55

6-
// Angular SSR settings
6+
// Angular SSR (Server Side Rendering) settings
77
ssr: {
88
enabled: true,
99
enablePerformanceProfiler: false,
10-
inlineCriticalCss: true,
10+
inlineCriticalCss: false,
1111
},
1212
};

src/environments/environment.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import { NotificationAnimationsType } from '../app/shared/notifications/models/n
77
export const environment: BuildConfig = {
88
production: false,
99

10-
// Angular SSR settings
10+
// Angular SSR (Server Side Rendering) settings
1111
ssr: {
1212
enabled: true,
1313
enablePerformanceProfiler: false,
14-
inlineCriticalCss: true,
14+
inlineCriticalCss: false,
1515
},
1616

1717
// Angular express server settings.

src/environments/environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { BuildConfig } from '../config/build-config.interface';
88
export const environment: Partial<BuildConfig> = {
99
production: false,
1010

11-
// Angular SSR settings
11+
// Angular SSR (Server Side Rendering) settings
1212
ssr: {
1313
enabled: false,
1414
enablePerformanceProfiler: false,
15-
inlineCriticalCss: true,
15+
inlineCriticalCss: false,
1616
},
1717
};
1818

0 commit comments

Comments
 (0)