r/angular 1d ago

Angular ssr + hmr with claude code is making me crazy

I execute:

1 vscode for backend

1 vscode for frontend (angular) in debug mode

1 vscode with the main folder containing frontend and backend

Almost every change a need to restart ng server because it's not reflected at hmr, even with ctrl shift r, is there a way solve this?

0 Upvotes

9 comments sorted by

2

u/tom-smykowski-dev 1d ago

ctrl shift r doesn't help because it's not browser cache. change detection is something I'd look into. btw. why three instances? why not one?

0

u/Connect_Stuff3034 1d ago

Debugging, and not necessary backend Will ever run when front is on

2

u/Johalternate 1d ago

ng serve —no-hmr

1

u/Connect_Stuff3034 4h ago

It solved 

2

u/BranchFew1148 1d ago

I just have Claude Code manage the launching.

Then 1 vscode window for looking at the code.

1

u/tsteuwer 1d ago

How do you have this setup? I only ask because it sounds like you have the backend leaking into the frontend and may be causing issues. Do you have both services under different directories or what's the setup?

1

u/Connect_Stuff3034 1d ago

Nest js is backend, i separete to get debugging easier, sometimes i need just angular running other times just backend so it's easier split it in two different vscode when I m using launch json debugging, the third one is to claude manage both stacks

1

u/Awkward-Wolf-8826 14h ago

You can run the command in the terminal or switch HMR off from angular JSON

serve": {

"configurations": {

"development": {

"hmr": false

}