Skip to content

index.html changes not picked up by ng build --watch #23851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
alcroito opened this issue Sep 2, 2022 · 1 comment · Fixed by #23852
Closed
1 task

index.html changes not picked up by ng build --watch #23851

alcroito opened this issue Sep 2, 2022 · 1 comment · Fixed by #23852

Comments

@alcroito
Copy link

alcroito commented Sep 2, 2022

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

No response

Description

Touching the project index.html file does not rebuild the application when using ng build --watch.
It does rebuild when using ng serve.

Using ng build -c development --watch doesn't make a difference.

Minimal Reproduction

Create new workspace with ng new someapp, choose default settings.
Run cd someapp && ng build --watch and wait for build to finish.
In a separate terminal run touch src/index.html. Observe no rebuild is happening.
Whereas touching index.html when using ng serve does cause a rebuild.

Exception or Error

No response

Your Environment

Angular CLI: 14.2.1
Node: 16.16.0
Package Manager: npm 8.11.0
OS: linux x64

Angular: 14.2.0
... animations, common, compiler, compiler-cli, core, forms
... 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.1 (cli-only)
@angular-devkit/schematics      14.2.1
@angular/cli                    14.2.1
@schematics/angular             14.2.1
rxjs                            7.5.6
typescript                      4.7.4

Anything else relevant?

No response

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Sep 2, 2022
…ld in watch mode

Since the index augmentation happens outside of Webpack previously the index html was not being watched during watch mode.

Closes angular#23851
@alan-agius4 alan-agius4 self-assigned this Sep 2, 2022
@clydin clydin closed this as completed in 130975c Sep 2, 2022
clydin pushed a commit that referenced this issue Sep 2, 2022
…ld in watch mode

Since the index augmentation happens outside of Webpack previously the index html was not being watched during watch mode.

Closes #23851

(cherry picked from commit 130975c)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants