[Angular] Dynamic replacement for index.html

in angular.json:

        "configurations": {
            "production": {
              "index": {
                "input": "src/index.prod.html",
                "output": "index.html"
              },
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
原文地址:https://www.cnblogs.com/Answer1215/p/12804139.html