Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- xi18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: rc.10Description
Production build breaks in rc11 and 12, if I disable optimization in angular-cli.json
it goes away. It builds in rc10.
🔬 Minimal Reproduction
I have tried to reproduce it using ng new
but the build doesn't emit the same metadata (design:type
)
🔥 Exception or Error
main-es2015.429909d094036241356a.js:6 Uncaught ReferenceError: Observable is not defined
at main-es2015.429909d094036241356a.js:6
at Object.6djU (main-es2015.429909d094036241356a.js:6)
at i (runtime-es2015.4f2dc2db4ea44dd7357a.js:1)
at Module.zUnb (main-es2015.429909d094036241356a.js:10)
at i (runtime-es2015.4f2dc2db4ea44dd7357a.js:1)
at Object.0 (main-es2015.429909d094036241356a.js:6)
at i (runtime-es2015.4f2dc2db4ea44dd7357a.js:1)
at t (runtime-es2015.4f2dc2db4ea44dd7357a.js:1)
at Array.r [as push] (runtime-es2015.4f2dc2db4ea44dd7357a.js:1)
at main-es2015.429909d094036241356a.js:1
If I disable optimization it works, and Observable is imported from webpack imports instead of as a global variable.
🌍 Your Environment
Angular CLI: 9.0.0-rc.12
Node: 13.7.0
OS: linux x64
Angular: 9.0.0-rc.11
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.0-rc.12
@angular-devkit/build-angular 0.900.0-rc.12
@angular-devkit/build-optimizer 0.900.0-rc.12
@angular-devkit/build-webpack 0.900.0-rc.12
@angular-devkit/core 8.3.24
@angular-devkit/schematics 8.3.24
@angular/cdk 8.2.3
@angular/cli 9.0.0-rc.12
@angular/language-service 9.0.0-rc.12
@ngtools/webpack 9.0.0-rc.12
@schematics/angular 9.0.0-rc.12
@schematics/update 0.900.0-rc.12
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2
Done in 0.44s.
Anything else relevant?