Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kevinrodriguezmorales/siget/llms.txt

Use this file to discover all available pages before exploring further.

The ng build command compiles the Siget application using the @angular/build:application builder and writes the output artifacts to the dist/ directory. By default it uses the production configuration, which enables full optimization — tree-shaking, minification, and file-name hashing — so the resulting bundle is ready to deploy immediately. A development configuration is also available for faster, unoptimized builds with source maps enabled.

Synopsis

ng build [project] [options]
npm run build
npm run watch

Options

OptionTypeDefaultDescription
--configuration / -cstringproductionNamed build configuration to use
--watchbooleanfalseRebuild automatically on source file changes
--source-mapbooleanfalseEmit source map files alongside the output bundles
--output-pathstringdist/Directory where build artifacts are written
--stats-jsonbooleanfalseGenerate a stats.json file for bundle analysis

Examples

# Production build (default)
ng build

# Development build — no optimization, source maps on
ng build --configuration development

# Development build with watch mode (same as npm run watch)
ng build --watch --configuration development

# Production build with bundle stats for analysis
ng build --stats-json

Output Directory Structure

After a successful build the compiled application is placed under dist/siget/. The browser/ sub-directory contains all assets served to end users.
dist/
└── siget/
    ├── browser/
    │   ├── index.html
    │   ├── main.[hash].js
    │   ├── polyfills.[hash].js
    │   └── styles.[hash].css
    └── ...
Output file-name hashing (outputHashing: "all") is enabled in the production configuration by default, ensuring browsers always fetch the latest assets after a deployment rather than serving stale cached files. Hashing is not applied in the development configuration.

Configuration in angular.json

The build architect target in angular.json shows how the two configurations differ:
"build": {
  "builder": "@angular/build:application",
  "options": {
    "browser": "src/main.ts",
    "tsConfig": "tsconfig.app.json",
    "inlineStyleLanguage": "scss",
    "assets": [
      { "glob": "**/*", "input": "public" }
    ],
    "styles": ["src/styles.scss"]
  },
  "configurations": {
    "production": {
      "budgets": [
        {
          "type": "initial",
          "maximumWarning": "500kB",
          "maximumError": "1MB"
        },
        {
          "type": "anyComponentStyle",
          "maximumWarning": "4kB",
          "maximumError": "8kB"
        }
      ],
      "outputHashing": "all"
    },
    "development": {
      "optimization": false,
      "extractLicenses": false,
      "sourceMap": true
    }
  },
  "defaultConfiguration": "production"
}
The defaultConfiguration is production, so a bare ng build always produces an optimized, deployment-ready bundle. The development configuration disables optimization and enables source maps to support faster iteration. Budget thresholds in production warn when the initial bundle exceeds 500 kB and error above 1 MB, helping you keep the application lean.

Build docs developers (and LLMs) love