Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/angular-server/src/ionic-server-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ export class IonicServerModule {}
export function hydrateIonicComponents(doc: any, appId: any) {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
return () => {
const supportsNativeAttachShadow =
typeof doc?.createElement?.('div')?.attachShadow === 'function';

return hydrateDocument(doc, {
clientHydrateAnnotations: false,
// Fallback for SSR DOMs (e.g. Domino) that do not implement attachShadow.
...(supportsNativeAttachShadow
? { clientHydrateAnnotations: false }
: {
serializeShadowRoot: 'scoped',
clientHydrateAnnotations: true,
}),
excludeComponents: [
// overlays
'ion-action-sheet',
Expand Down