[X] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
browser builder (webpack based)
Description
When running ng build --watch with either the build-esbuild or application builder, there is first a build step where everything is copied to the destination folder, including assets, but if a change is made to an asset after the initial bundle, then nothing happens. I'd expect the assets defined in the builders' "assets" option to also be updated during watch mode.
When I try the same in the webpack based "browser" builder, then everything is copied.
Minimal Reproduction
In angular.json, put the following inside "architect":
I have tried to dive into the Angular CLI source code, and I found that the watcher is given which files to watch here. I think the result comes from here, but it's a bit abstracted away and I can't easily find the source.
@alan-agius4 Any hope to get this fixed in 19.1, 19.2 or 20? I even pointed to relevant parts of the code under "Anything else relevant", so it should be a pretty quick fix.
Command
build
Is this a regression?
The previous version in which this bug was not present was
browser builder (webpack based)
Description
When running
ng build --watch
with either the build-esbuild or application builder, there is first a build step where everything is copied to the destination folder, including assets, but if a change is made to an asset after the initial bundle, then nothing happens. I'd expect the assets defined in the builders' "assets" option to also be updated during watch mode.When I try the same in the webpack based "browser" builder, then everything is copied.
Minimal Reproduction
ng build --watch
.Exception or Error
No response
Your Environment
Anything else relevant?
I have tried to dive into the Angular CLI source code, and I found that the watcher is given which files to watch here. I think the result comes from here, but it's a bit abstracted away and I can't easily find the source.