🐞 bug report
Affected Package
@angular/compiler
Is this a regression?
No, but this is more relevant now because angular-cli permits ES2015 targets.
Description
When targeting ES2015, emitDecoratorMetadata causes a ReferenceError.
🔬 Minimal Reproduction
https://github.com/pauldraper/angular-decorator-metadata
Load in browser.
🔥 Exception or Error
main.js:98 Uncaught ReferenceError: Cannot access 'AppService' before initialization
at Module../src/app.component.ts (main.js:98)
at __webpack_require__ (runtime.js:80)
at Module../src/app.module.ts (main.js:123)
at __webpack_require__ (runtime.js:80)
at Module../src/main.ts (main.js:157)
at __webpack_require__ (runtime.js:80)
at Object.0 (main.js:174)
at __webpack_require__ (runtime.js:80)
at checkDeferredModules (runtime.js:46)
at Array.webpackJsonpCallback [as push] (runtime.js:33)
🌍 Your Environment
Angular Version:
Angular 8.1.1
Anything else relevant?
Removing emitDecoratorMetadata, or targeting es5 fixes the problem.
🐞 bug report
Affected Package
@angular/compiler
Is this a regression?
No, but this is more relevant now because angular-cli permits ES2015 targets.
Description
When targeting ES2015, emitDecoratorMetadata causes a ReferenceError.
🔬 Minimal Reproduction
https://github.com/pauldraper/angular-decorator-metadata
Load in browser.
🔥 Exception or Error
🌍 Your Environment
Angular Version:
Angular 8.1.1
Anything else relevant?
Removing emitDecoratorMetadata, or targeting es5 fixes the problem.