Difference between ng serve and ng build
ng serve |
ng build |
---|---|
The ng serve command is intended for fast, local, and iterative developments and also for building, watching, and serving the application from a local CLI development server.intentional |
The ng build command is intentionally for building the apps and deploying the build artifacts. |
The command does not generate an output folder. |
The output folder is â dist/. |
The ng serve builds artifacts from memory instead for a faster development experience. |
The ng build command generates output files just once and doesnât serve them. |
Enabled by default, detects changes in source files and automatically rebuilds and reloads the application in the browser. |
Not enabled by default, requires the âwatch flag to rebuild the application on file changes. |
Suitable for local development and testing purposes. |
Intended for deploying the application to a web server or hosting platform. |
Contact Us