ng serve • Angular

build-target

A build builder target to serve in the format of project:target[:configuration]. You can also pass in more than one configuration name as a comma-separated list. Example: project:target:production,staging.

Value Typestring

define

Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.

Value Typearray

headers

Custom HTTP headers to be added to all responses.

Value Typearray

help

Shows a help message for this command in the console.

Value Typeboolean

hmr

Enable hot module replacement. Defaults to the value of 'liveReload'. Currently, only global and component stylesheets are supported.

Value Typeboolean

Value TypestringDefaultlocalhost

inspect

Activate debugging inspector. This option only has an effect when 'SSR' or 'SSG' are enabled.

Value Typestring

live-reload

Whether to reload the page on change, using live-reload.

Value TypebooleanDefaulttrue

Opens the url in default browser.

Value TypebooleanDefaultfalse

poll

Enable and define the file watching poll time period in milliseconds.

Value Typenumber

Value TypenumberDefault4200

prebundle

Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled.

Value TypebooleanDefaulttrue

serve-path

The pathname where the application will be served.

Value Typestring

Value TypebooleanDefaultfalse

ssl-cert

SSL certificate to use for serving HTTPS.

Value Typestring

ssl-key

SSL key to use for serving HTTPS.

Value Typestring

verbose

Adds more details to output logging.

Value Typeboolean

Value TypebooleanDefaulttrue