fix(bazel): do not modify tsconfig.json (#30877)
Before this change, user's tsconfig.json is cloned and some options controlled by Bazel are removed otherwise Bazel would complain about: ``` WARNING: your tsconfig.json file specifies options which are overridden by Bazel: - compilerOptions.target and compilerOptions.module are controlled by downstream dependencies, such as ts_devserver - compilerOptions.typeRoots is always set to the @types subdirectory of the node_modules attribute - compilerOptions.rootDir and compilerOptions.baseUrl are always the workspace root directory ``` Since the warning has been removed in rules_typescript/8d8d398, there's no need to clone and backup tsconfig.json PR Close #30877
This commit is contained in:

committed by
Andrew Kushnir

parent
699283c4ee
commit
b0866769b0
@ -1,11 +1,11 @@
|
||||
# Building with Bazel
|
||||
|
||||
This guide explains how to build and test Angular apps with Bazel.
|
||||
This guide explains how to build and test Angular apps with Bazel.
|
||||
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
|
||||
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
|
||||
|
||||
It describes features which are part of Angular Labs, and are not considered a stable, supported API.
|
||||
|
||||
@ -33,7 +33,7 @@ then create the new application with
|
||||
ng new --collection=@angular/bazel
|
||||
```
|
||||
|
||||
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
|
||||
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
|
||||
Bazel is used behind the scenes.
|
||||
Outputs from Bazel appear in the `dist/bin` folder.
|
||||
|
||||
@ -45,7 +45,6 @@ Outputs from Bazel appear in the `dist/bin` folder.
|
||||
If you need to opt-out from using Bazel, you can restore the backup files:
|
||||
|
||||
- `/angular.json.bak` replaces `/angular.json`
|
||||
- `/tsconfig.json.bak` replaces `/tsconfig.json`
|
||||
|
||||
## Advanced configuration
|
||||
|
||||
@ -63,7 +62,7 @@ You can manually adjust the Bazel configuration to:
|
||||
* customize the build steps
|
||||
* parallellize the build for scale and incrementality
|
||||
|
||||
Create the initial Bazel configuration files by running the following command:
|
||||
Create the initial Bazel configuration files by running the following command:
|
||||
|
||||
```sh
|
||||
ng build --leaveBazelFilesOnDisk
|
||||
@ -120,4 +119,4 @@ Rules are used in `BUILD.bazel` files, which are markers for the packages in you
|
||||
|
||||
In the `BUILD.bazel` file, each rule must first be imported, using the `load` statement. Then the rule is called with some attributes, and the result of calling the rule is that you've declared to Bazel how it can derive some outputs given some inputs and dependencies. Then later, when you run a `bazel` command line, Bazel loads all the rules you've declared to determine an absolute ordering of what needs to be run. Note that only the rules needed to produce the requested output will actually be executed.
|
||||
|
||||
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.
|
||||
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.
|
||||
|
Reference in New Issue
Block a user