LinuxCommandLibrary

ng-build

compiles Angular applications

TLDR

Build for production

$ ng build --configuration production
copy
Build with source maps
$ ng build --source-map
copy
Build specific project
$ ng build [project-name]
copy
Watch mode
$ ng build --watch
copy
Set output path
$ ng build --output-path [dist/custom]
copy
Build with stats
$ ng build --stats-json
copy
Development build
$ ng build --configuration development
copy

SYNOPSIS

ng build [project] [options]

DESCRIPTION

ng build compiles Angular applications. It bundles code for deployment.
The command handles TypeScript compilation. Produces optimized production bundles.

PARAMETERS

PROJECT

Project to build.
--configuration NAME
Build configuration.
--source-map
Generate source maps.
--watch
Rebuild on changes.
--output-path DIR
Output directory.
--stats-json
Generate build stats.
--help
Display help information.

CAVEATS

Part of Angular CLI. Configuration in angular.json. Webpack-based.

HISTORY

ng build is part of Angular CLI, providing standardized build process for Angular applications.

SEE ALSO

ng(1), ng-serve(1), webpack(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community