0

在我的Angular.json文件中。我有

      "configurations": {
        "production": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ],
          "optimization": true,
          "outputHashing": "all",
          "sourceMap": true,
          "extractCss": true,
          "namedChunks": false,
          "aot": true,
          "progress": true,
          "buildOptimizer": true,
          "budgets": [
            {
              "type": "initial",
              "maximumWarning": "2mb",
              "maximumError": "5mb"
            }
          ]
        }
      }

这是在我运行时执行的ng build --prod

如何创建新配置,例如 dev ?

4

1 回答 1

1

将环境配置添加到 angular.json 后,您可以使用 --configuration 选项构建它。在你的情况下ng build --configuration=development

于 2019-08-21T17:39:18.923 回答