Skip to main content

Posts

Showing posts with the label ng serve

ng build vs. ng serve Commands in Angular 4/5

What Are Difference Between ng build and ng serve Commands? The ng build command is intentionally for building the apps and deploying the build artefacts. ng build The ng serve command is intentionally for fast, local and iterative developments and also for builds, watches and serves the application from a local CLI development server. ng serve Both commands ng build and ng serve - clear the output folder before they build the project. The main difference is – “The ng build command writes generated build artefacts to the output folder and the ng serve command does not writes build and the ng serve build artefacts from memory instead for a faster development experience.” The by default output folder is - dist/ The ng build --watch command is used to regenerate output files when source files change and the --watch flag is useful when we are building during development and it automatically re-deploying changes to another server. ng build --...