# Building for Production — Angular

Source: https://www.geekswithgeeks.com/en/angular/ng-production-build

> Package the app for deployment with ng build.

## ng build

`ng build` compiles, minifies, and bundles the app into static files under `dist/`, ready to serve from any static host.

```bash
ng build
# output goes to dist/my-app/
```

## What production mode does

A production build enables ahead-of-time (AOT) compilation, tree-shaking, and minification — smaller bundles and faster startup than the dev server.

**Quiz:** What command packages an Angular app for deployment?

- [ ] ng serve
- [x] ng build
- [ ] ng test

*Answer:* ng build. `ng build` produces optimized static files in `dist/`, while `ng serve` is only for local development.
