-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
Milestone
Description
🐞 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
ng serve
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.
Metadata
Metadata
Assignees
Labels
area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix