Angular 8 – Building with Bazel
”;
Bazel is an advanced build and test tool. It supports lot of features suitable for large projects.
Some of the features of Bazel are as follows:
- Support multiple languages.
- Support multiple platforms.
- Support multiple repository.
- Support high-level build language.
- Fast and reliable.
Angular supports building the application using bazel. Let us see how to use bazel to compile Angular application.
First, install @angular/bazel package.
npm install -g @angular/bazel
For existing application, Add @angular/bazel as mentioned below:
ng add @angular/bazel
For new application, use below mentioned command:
ng new --collection=@angular/bazel
To build an application using bazel, use below command:
ng build --leaveBazelFilesOnDisk
Here,
leaveBazelFilesOnDisk option will leave the bazel files created during build process, which we can use to build the application directly using bazel.
To build application using bazel directly, install @bazel/bazelisk and then, use bazelisk build command.
npm install -g @bazel/bazelisk bazelisk build
”;