Skip to content

Commit 8532f53

Browse files
committed
feat(@angular-devkit/build-angular): ensure required JIT polyfills
1 parent 1b268b2 commit 8532f53

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
import 'core-js/es7/reflect';

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
6262
entryPoints['polyfills'] = [path.resolve(root, buildOptions.polyfills)];
6363
}
6464

65+
if (!buildOptions.aot) {
66+
entryPoints['polyfills'] = [
67+
...(entryPoints['polyfills'] || []),
68+
path.join(__dirname, '..', 'jit-polyfills.js'),
69+
];
70+
}
71+
6572
// determine hashing format
6673
const hashFormat = getOutputHashFormat(buildOptions.outputHashing as any);
6774

0 commit comments

Comments
 (0)