Skip to content

HMR story is pointing wrong configuration #11093

Closed
@carlos-algms

Description

@carlos-algms

Currently it saying that we should put the configuration withing "server" section:

"serve": {
  "configuration": {
    "hmr": {
      "hmr": true,
      "fileReplacements": [
        {
          "replace": "src/environments/environment.ts",
          "with": "src/environments/environment.hmr.ts"
        }
      ]
    }
  }
}

But it is not allowed, due to schema validation:

image

And it is breaking with a not so friendly error, because the "path" is empty:
(actually it should be a bug, because every wrong key, breaks with an empty path error)

Schema validation failed with the following errors:
  Data path "" should NOT have additional properties(fileReplacements).

The correct location should be within "build" section:

image

And under server section only:

"serve": {
  "configurations": {
      "hmr": {
          "hmr": true
      }
  }
}

Angular version: 6.0.3
Angular CLI version: 6.0.3

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