Skip to content

Commit 678b19d

Browse files
ChBernatadamdbradley
authored andcommitted
fix(prerender): export DEFAULT_MODE for platform-server (#1366)
1 parent e0a085a commit 678b19d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/compiler/prerender/host-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export function mergeUserHostConfig(userHostConfig: d.HostConfig, hostConfig: d.
283283
}
284284

285285

286-
const DEFAULT_MODE = 'md';
286+
export const DEFAULT_MODE = 'md';
287287
const MAX_LINK_REL_PRELOAD_COUNT = 6;
288288
export const HOST_CONFIG_FILENAME = 'host.config.json';
289289

src/server/platform-server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { proxyController } from '../core/proxy-controller';
1515
import { queueUpdate } from '../core/update';
1616
import { serverAttachStyles, serverInitStyle } from './server-styles';
1717
import { toDashCase } from '../util/helpers';
18+
import {DEFAULT_MODE} from "../compiler/prerender/host-config";
1819

1920

2021
export function createPlatformServer(
@@ -390,7 +391,7 @@ export function createPlatformServer(
390391
export function getComponentBundleFilename(cmpMeta: d.ComponentMeta, modeName: string) {
391392
let bundleId: string = (typeof cmpMeta.bundleIds === 'string') ?
392393
cmpMeta.bundleIds :
393-
((cmpMeta.bundleIds as d.BundleIds)[modeName] || (cmpMeta.bundleIds as d.BundleIds)[DEFAULT_STYLE_MODE]);
394+
((cmpMeta.bundleIds as d.BundleIds)[modeName] || (cmpMeta.bundleIds as d.BundleIds)[DEFAULT_MODE] || (cmpMeta.bundleIds as d.BundleIds)[DEFAULT_STYLE_MODE]);
394395

395396
if (cmpMeta.encapsulationMeta === ENCAPSULATION.ScopedCss || cmpMeta.encapsulationMeta === ENCAPSULATION.ShadowDom) {
396397
bundleId += '.sc';

0 commit comments

Comments
 (0)