Commit 30f8352
feat(@angular-devkit/build-angular): automatically include reflect metadata polyfill for JIT
The reflect metadata polyfill is only required by Angular when using JIT. Since it is unanticipated it would be needed when using AOT, including it when using AOT only serves to unnecessarily increase application file sizes.
JIT is not recommended for production use. However, if an application uses JIT in production and an alternate reflect metadata polyfill is preferred (core-js/es7/reflect is currently used), then TypeScript path mapping can be used to override the polyfill. As an example, the following will allow the usage of the `reflect-metadata` package in lieu of the default:
```
"paths": {
"core-js/es7/reflect": ["node_modules/reflect-metadata"]
}
```1 parent 1b268b2 commit 30f8352
File tree
2 files changed
+15
-0
lines changed- packages/angular_devkit/build_angular/src/angular-cli-files/models
- webpack-configs
2 files changed
+15
-0
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments