Hello@Himanshu Chaudhary,
Thanks for taking time to post this issue in Microsoft Q&A forum.
The below document says ng serve
: Builds and serves your application, rebuilding on file changes. if there is any single file change and it will goes into loop compilation. I use ng serve
to compile angular application and modify some files during compilation ,then i find it keeps on compiling.
Test environment:
Angular CLI: 15.2.4
Node: 18.13.0
Package Manager: npm 8.19.3
Test result:
Here’re suggestions you can check:
1 Save all your files in your angular project and use ng serve
to build again and Ensure that no file changes are made during compilation.
2 add -- watch and set it to false(it’s default value is true).After setting -- watch to false, it will not rebuild on change.
ng serve --watch false
BTW I'm not sure if that will fully address your problem .Could you provide your simple reproduce code and compiling output screenshot for us to investigate further and provide effective solutions?
Feel free to contact us.
Sincerely,
Douxu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.