question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
zanctorcommented, Sep 19, 2022

@alan-agius4, makes sense. I will close the issue. Thanks!

0reactions
angular-automatic-lock-bot[bot]commented, Oct 20, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zanctor (zanctor) - PullAnswer
index.html is rebuilt infinitely in watch mode, if it is right in the `outputPath` path. 1 Likes 4 Replies. zanctor. 2022-09-16 ...
Read more >
Webpack in watch mode takes too long to build - Stack Overflow
The biggest problem is that every change you delete the built folders and everything is copied again by 'CopyPlugin'. Isn't it better to...
Read more >
Files created right before watching starts make ... - GitHub
I've noticed this strange behaviour where watcher loops for 10 seconds due to this code: if(data) { var ts = data[0] === data[1]...
Read more >
Why webpack-dev-server Live-Reload Is Not Working - Medium
When I modify javascript files, I have to manually run Webpack CLI to see changes to bundle.js in the local filesystem, and bundle.js...
Read more >
Dockerizing an Angular App - Michael Herman
Docker is a containerization tool used to streamline application development and deployment workflows across various environments.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found