fix(@angular/build): use stable worker filenames during dev server by maruthang · Pull Request #32940 · angular/angular-cli

@maruthang

… prevent hash changes on rebuild

During `ng serve`, web workers were always bundled with `entryNames: 'worker-[hash]'`
regardless of whether the parent build used hashing. Combined with inherited `footer`
and `splitting` options from the parent build that could change between rebuilds, this
caused the worker filename hash to change on every rebuild even when the worker content
was unchanged, breaking debugging sessions.

The fix conditionally uses `worker-[hash]` only when the parent build uses hashing
(production builds), and `worker-[name]` otherwise (dev server). It also explicitly
sets `splitting: false` and `footer: undefined` in the worker build to prevent
non-deterministic output that could affect hashing.

Closes angular#30494