Angular is a TypeScript-based web application framework. It is a complete rewrite from the team that built AngularJS.
Angular build uses a command ng build
to build a new project of type “application” or “library”. When building libraries, the builder only invokes the ts-config, configuration, and watch options.
The application builder uses the Webpack build tool with default configuration options specified in the workspace configuration file (angular.json) or with a named alternative configuration.
Whenever a project is created using the command-line interface, a production configuration is created by default.
ng build <project> [options]
The <project>
parameter refers to the name of the project. It is a required parameter.
[options]
refers to the various options offered by build
that the user can utilize.
Below are a few options and their descriptions from the official documentation:
--allowed-common-js-dependencies
// A list of CommonJS packages that are allowed to be used without a build time warning.
--aot
// Build using Ahead of Time compilation.
--base-href
// Base url for the application being built.
--build-optimizer
// Enables '@angular-devkit/build-optimizer' optimizations when using the 'aot' option.
--common-chunk
// Use a separate bundle containing code that is used across multiple bundles.
Free Resources