Skip to content

angular.json udk target: move fileReplacements into server target #1

Description

@enten

Initially, I wrote udk:udk-builder to accept fileReplacements because the Angular CLI wasn't support them.

It's not the case today.

Now you can move your fileReplacements declarations into server target. Be careful to use the latest syntax of Angular CLI:

        "server": {
          "builder": "@angular-devkit/build-angular:server",
          "options": {
            "outputPath": "dist/server",
            "main": "src/app/ngmodule.ts",
            "tsConfig": "src/tsconfig.server.json"
          },
          "configurations": {
            "production": {
+              "fileReplacements": [
+                {
+                  "replace": "src/environments/environment.ts",
+                  "with": "src/environments/environment.prod.ts"
+                }
+              ]
            }
          }
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions