Tuesday, 25 November 2025

Create local ts file for enviornment latest angular 20

create environment.local.ts

and environment.ts files
in package.json give ng s

"start": "ng  s --configuration local",

    "configurations": {

            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "budgets": [
                {
                  "type": "initial",
                  "maximumWarning": "2MB",
                  "maximumError": "2.5MB"
                },
                {
                  "type": "anyComponentStyle",
                  "maximumWarning": "6kB",
                  "maximumError": "10kB"
                }
              ],
              "outputHashing": "all"
            },
            "development": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.dev.ts"
                }
              ],
              "optimization": false,
              "extractLicenses": false,
              "sourceMap": true
            },
            "test": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.test.ts"
                }
              ],
              "sourceMap": true,
              "optimization": false
            },
            "local": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.local.ts"
                }
              ],
              "sourceMap": true,
              "optimization": false
            }
          },
          "defaultConfiguration": "local"
        },
        "serve": {
          "builder": "@angular/build:dev-server",
          "configurations": {
            "production": {
              "buildTarget": "EnviriUARUI:build:production"
            },
            "development": {
              "buildTarget": "EnviriUARUI:build:development"
            },
            "test": {
              "buildTarget": "EnviriUARUI:build:test"
            },
             "local": {
              "buildTarget": "EnviriUARUI:build:local"
            }
          },
          "defaultConfiguration": "local"
        }

No comments:

Post a Comment

dropdownsearch for dyanmic fields

    I’ve enabled searchable dropdowns for all dynamic dropdown controls in Assignment Details. What I changed Added a  dropdownSearch  map...