English 中文(简体)
Angular 8 - Building with Bazel
  • 时间:2024-09-17

Angular 8 - Building with Bazel


Previous Page Next Page  

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 repable.

Angular supports building the apppcation using bazel. Let us see how to use bazel to compile Angular apppcation.

First, install @angular/bazel package.


npm install -g @angular/bazel 

For existing apppcation, Add @angular/bazel as mentioned below:


ng add @angular/bazel

For new apppcation, use below mentioned command:


ng new --collection=@angular/bazel 

To build an apppcation 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 apppcation directly using bazel.

To build apppcation using bazel directly, install @bazel/bazepsk and then, use bazepsk build command.


npm install -g @bazel/bazepsk 
bazepsk build
Advertisements