angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

esbuild is not reloading on asset only changes

Open iKrishnaSahu opened this issue 2 years ago • 5 comments

Command

serve

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

esbuild is not detecting style changes when importing style file inside index.html

This issue does not happen in non esbuild builder

Minimal Reproduction

ng17rc1.zip

  • unzip above zip file and run npm install
  • check UI
  • now go to src\assets\ruf-default.css and update color property of header element to some other color
  • check if styles are reflecting on UI

Exception or Error

No response

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 17.0.0-rc.1
Node: 18.18.2
Package Manager: npm 8.19.3
OS: win32 x64

Angular: 17.0.0-rc.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-rc.1
@angular-devkit/build-angular   17.0.0-rc.1
@angular-devkit/core            17.0.0-rc.1
@angular-devkit/schematics      17.0.0-rc.1
@schematics/angular             17.0.0-rc.1
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else relevant?

No response

iKrishnaSahu avatar Oct 26 '23 11:10 iKrishnaSahu

This is caused by at the moment, the page is not reloaded when only an asset change.

alan-agius4 avatar Oct 26 '23 13:10 alan-agius4

@alan-agius4 Would this affect template-only changes in components? After upgrading to 17, I can't seem to trigger a browser refresh when modifying a component HTML template, but modifying a component .ts file seems to work fine.

bobbyg603 avatar Nov 10 '23 20:11 bobbyg603

@alan-agius4 Would this affect template-only changes in components? After upgrading to 17, I can't seem to trigger a browser refresh when modifying a component HTML template, but modifying a component .ts file seems to work fine.

the problem was something else, I spun up a new angular app to demonstrate the problem and it worked fine. i fixed the problem in my app by copying the new angular.json file into my project.

bobbyg603 avatar Nov 10 '23 23:11 bobbyg603

@alan-agius4 Would this affect template-only changes in components? After upgrading to 17, I can't seem to trigger a browser refresh when modifying a component HTML template, but modifying a component .ts file seems to work fine.

the problem was something else, I spun up a new angular app to demonstrate the problem and it worked fine. i fixed the problem in my app by copying the new angular.json file into my project.

I was running into this also, and having aot: false in the configuration is what was causing the HTML template modifications to be detected.

ghost avatar Nov 23 '23 04:11 ghost

still an issue on the 17.2.3

blahblehblah avatar May 01 '24 19:05 blahblehblah