fix(bazel): ng build should produce prod bundle (#29136)

`ng build` should produce a bundle that could be readily deployed to
a web server, similar to the behavior of current `ng build` with
webpack.

Note that in Bazel, there is no `ng build` for dev bundles. Instead,
users are expected to run `ts_devserver`.

Closes https://github.com/angular/angular/issues/28877

PR Close #29136
This commit is contained in:
Keen Yee Liau 2019-03-06 11:02:44 -08:00 committed by Kara Erickson
parent f856a6597b
commit 14ce8a9c31
1 changed files with 2 additions and 7 deletions

View File

@ -127,14 +127,9 @@ function updateAngularJsonToUseBazelBuilder(options: Schema): Rule {
recorder, architect, 'build', { recorder, architect, 'build', {
builder: '@angular/bazel:build', builder: '@angular/bazel:build',
options: { options: {
targetLabel: '//src:bundle.js', targetLabel: '//src:prodapp',
bazelCommand: 'build', bazelCommand: 'build',
}, }
configurations: {
production: {
targetLabel: '//src:bundle',
},
},
}, },
indent); indent);
replacePropertyInAstObject( replacePropertyInAstObject(