Skip to content

build: remove workaround for decorator metadata in universal-app #19840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
9 changes: 0 additions & 9 deletions src/universal-app/prerender.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import 'reflect-metadata';
import 'zone.js';

// We need to mock a few native DOM globals as those are not present on the server, but they
// are required for decorator metadata. The View Engine compiler preserves Angular decorator
// metadata in the JS output. This could mean for example that inputs which are typed to
// `HTMLElement` break on the server, as the `__decorate` call requires the `HTMLElement`
// global to be present. More details: https://github.com/angular/angular/issues/30586.
(global as any).HTMLElement = {};
(global as any).Event = {};
(global as any).TransitionEvent = {};

import {renderModuleFactory} from '@angular/platform-server';
import {readFileSync, writeFileSync} from 'fs';
import {join} from 'path';
Expand Down