Skip to content

index.html is rebuilt infinitely in watch mode, if it is right in the outputPath path #23923

Closed as not planned
@zanctor

Description

@zanctor

Command

build

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14.2.1

Description

If index path in angular.json lies right under the outputPath (ex. index is public/index.html and outputPath is public), it will cause infinite rebuilding of index.html when the --watch option is used.

Probably caused by #23852.

Minimal Reproduction

  1. Create a new workspace with ng new testapp with default settings.
  2. Open testapp/angular.json and change the outputPath option to src.
  3. Run cd testapp && ng build --watch --no-delete-output-path and wait for initial build to finish.
  4. Observe the result.

Exception or Error

No response

Your Environment

Angular CLI: 14.2.2
Node: 14.19.1
Package Manager: yarn 1.22.10 
OS: darwin x64

Angular: 14.2.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.1
@angular-devkit/build-angular   14.2.1
@angular-devkit/core            14.2.2
@angular-devkit/schematics      14.2.2
@schematics/angular             14.2.2
rxjs                            7.5.6
typescript                      4.6.4
webpack                         4.46.0

Anything else relevant?

No response

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