Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting (tick)
- [ ] feature request
Versions.
@angular/cli: 1.5.0-beta.1
node: 8.5.0
os: darwin x64
@angular/animations: 4.4.3
@angular/cdk: 2.0.0-beta.11
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/material: 2.0.0-beta.11
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.5.0-beta.1
@angular/compiler-cli: 4.4.3
typescript: 2.5.2
Repro steps.
ng new --skip-git crash-test-dummy
# then edit tsconfig.json and change target to es2015
ng serve
# load served url in browser, note that the app fails to initialise
The log given by the failure.
Exception observed in browser console:
Uncaught TypeError: Cannot convert undefined or null to object
at Function.getPrototypeOf (<anonymous>)
at getParentCtor (core.js:1729)
at ReflectionCapabilities.parameters (core.js:1542)
at JitReflector.parameters (compiler.js:26622)
at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15324)
at CompileMetadataResolver._getFactoryMetadata (compiler.js:15263)
at CompileMetadataResolver.getProviderMetadata (compiler.js:15533)
at JitCompiler._compileModule (compiler.js:26063)
at SyncAsync.then (compiler.js:26013)
at Object.then (compiler.js:1633)
Mention any other details that might be useful.
#7610 made it so that es2015 targets are supported (yay). It achieved that for production builds, but doesn't seem usable since serve builds are now broken!
Within that PR (#7610), if the changes to packages/@angular/cli/models/webpack-configs/common.ts
are instead performed entirely within packages/@angular/cli/models/webpack-configs/production.ts
, serve
and build
work as I expect them to.