File replacements are ignored for web workers #29546
Labels
angular/build:application
area: @angular/build
freq1: low
Only reported by a handful of users who observe it rarely
severity3: broken
type: bug/fix
Command
build, serve
Is this a regression?
The previous version in which this bug was not present was
v18
Description
Hi, we recently updated to angular v19. During that we also migrated the builder to the recommended
@angular/build
builder, but in my tests the error also occured for the old devkit builder. After the update, we noticed that file replacements are ignored for web workers, see minimal reproduction. Before our upgrade, this was working without problems. I'm happy about any help :)Minimal Reproduction
StackBlitz: https://stackblitz.com/edit/4gqtqodb
After everything was built, you will see in the console:
However, as defined in the
angular.json
, the fileenv.ts
should be replaced byenv.prod.ts
, which is done correctly in the component.Exception or Error
Your Environment
Anything else relevant?
Seems to happen for both build and serve, local and on stackblitz and for both the devkit and the new builder.
The text was updated successfully, but these errors were encountered: