mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Merge pull request #2901 from DSpace/backport-2067-to-dspace-7_x
[Port dspace-7_x] Add configuration option to disable inlined CSS in SSR HTML
This commit is contained in:
@@ -17,6 +17,13 @@ ui:
|
|||||||
# Trust X-FORWARDED-* headers from proxies (default = true)
|
# Trust X-FORWARDED-* headers from proxies (default = true)
|
||||||
useProxies: true
|
useProxies: true
|
||||||
|
|
||||||
|
universal:
|
||||||
|
# Whether to inline "critical" styles into the server-side rendered HTML.
|
||||||
|
# Determining which styles are critical is a relatively expensive operation;
|
||||||
|
# this option can be disabled to boost server performance at the expense of
|
||||||
|
# loading smoothness.
|
||||||
|
inlineCriticalCss: true
|
||||||
|
|
||||||
# The REST API server settings
|
# The REST API server settings
|
||||||
# NOTE: these settings define which (publicly available) REST API to use. They are usually
|
# NOTE: these settings define which (publicly available) REST API to use. They are usually
|
||||||
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
|
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
|
||||||
|
@@ -131,6 +131,7 @@ export function app() {
|
|||||||
server.engine('html', (_, options, callback) =>
|
server.engine('html', (_, options, callback) =>
|
||||||
ngExpressEngine({
|
ngExpressEngine({
|
||||||
bootstrap: ServerAppModule,
|
bootstrap: ServerAppModule,
|
||||||
|
inlineCriticalCss: environment.universal.inlineCriticalCss,
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: REQUEST,
|
provide: REQUEST,
|
||||||
|
@@ -4,4 +4,13 @@ export interface UniversalConfig extends Config {
|
|||||||
preboot: boolean;
|
preboot: boolean;
|
||||||
async: boolean;
|
async: boolean;
|
||||||
time: boolean;
|
time: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to inline "critical" styles into the server-side rendered HTML.
|
||||||
|
*
|
||||||
|
* Determining which styles are critical is a relatively expensive operation;
|
||||||
|
* this option can be disabled to boost server performance at the expense of
|
||||||
|
* loading smoothness.
|
||||||
|
*/
|
||||||
|
inlineCriticalCss?: boolean;
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,7 @@ export const environment: Partial<BuildConfig> = {
|
|||||||
universal: {
|
universal: {
|
||||||
preboot: true,
|
preboot: true,
|
||||||
async: true,
|
async: true,
|
||||||
time: false
|
time: false,
|
||||||
|
inlineCriticalCss: true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -12,7 +12,8 @@ export const environment: Partial<BuildConfig> = {
|
|||||||
universal: {
|
universal: {
|
||||||
preboot: false,
|
preboot: false,
|
||||||
async: true,
|
async: true,
|
||||||
time: false
|
time: false,
|
||||||
|
inlineCriticalCss: true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user