Skip to content

Schema validation rejects *.html files in fileReplacements (Regression in 11.0.0 & 11.0.1) #19438

@dougamos

Description

@dougamos

🐞 Bug report

Command (mark with an x)

  • build
  • serve

Is this a regression?

Yes, the previous version in which this bug was not present was: 10.2.3

Description

There are new changes in files .\node_modules\@angular-devkit\build-angular\src\browser\schema.json and .\node_modules\@angular-devkit\build-angular\src\server\schema.json that restrict using *.html files in fileReplacements operations that were always available in previous versions.

We use different index.html files depending on the environment so use fileReplacements to do this.

This is similar to #19378.

🔥 Exception or Error

Schema validation failed with the following errors:


  Data path ".fileReplacements[0]" should NOT have additional properties(replace).
  Data path ".fileReplacements[0].replace" should match pattern "\.([cm]?j|t)sx?$".
  Data path ".fileReplacements[0]" should match exactly one schema in oneOf.

🌍 Your Environment


Angular CLI: 10.1.4
Node: 10.22.0
OS: darwin x64

Angular: undefined
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1001.4 (cli-only)
@angular-devkit/core         10.1.4 (cli-only)
@angular-devkit/schematics   10.1.4 (cli-only)
@schematics/angular          10.1.4 (cli-only)
@schematics/update           0.1001.4 (cli-only)
 

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