mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 05:52:41 +08:00
Having css extraction on all the time makes dev rebuild times very slow for global styles. This flag defaults to false on dev targets and true on prod targets.
40 lines
914 B
Markdown
40 lines
914 B
Markdown
# ng serve
|
|
|
|
## Overview
|
|
`ng serve` builds the application and starts a web server
|
|
|
|
## Options
|
|
`--port` (`-p`) port to serve the application on
|
|
|
|
`--host` (`-H`)
|
|
|
|
`--proxy-config` (`-pc`)
|
|
|
|
`--watcher` (`-w`) provide a new watcher
|
|
|
|
`--live-reload` (`-lr`) flag to turn off live reloading
|
|
|
|
`--live-reload-host` (`-lrh`) specify the host for live reloading
|
|
|
|
`--live-reload-base-url` (`-lrbu`) specify the base URL for live reloading
|
|
|
|
`--live-reload-port` (`-lrp`) port for live reloading
|
|
|
|
`--live-reload-live-css` flag to live reload CSS
|
|
|
|
`--target` (`-t`, `-dev`, `-prod`) target environment
|
|
|
|
`--environment` (`-e`) build environment
|
|
|
|
`--ssl` flag to turn on SSL
|
|
|
|
`--ssl-key` path to the SSL key
|
|
|
|
`--ssl-cert` path to the SSL cert
|
|
|
|
`--aot` flag to turn on Ahead of Time compilation
|
|
|
|
`--open` (`-o`) opens the app in the default browser
|
|
|
|
`--extract-css` extract css from global styles onto css files instead of js ones
|