angular-cli: Browser does not refresh after code changed
angular-cli: 1.0.0-beta.28.3 node: 6.9.2 os: win32 x64 @angular/common: 2.4.5 @angular/compiler: 2.4.5 @angular/core: 2.4.5 @angular/forms: 2.4.5 @angular/http: 2.4.5 @angular/platform-browser: 2.4.5 @angular/platform-browser-dynamic: 2.4.5 @angular/router: 3.4.5 @angular/compiler-cli: 2.4.5
ng serve
code change
webpack: Compiling... Hash: 228604d16756d5a0fdd3 Time: 717ms chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 222 kB {4} [initial] chunk {1} main.bundle.js, main.bundle.map (main) 3.97 kB {3} [initial] chunk {2} styles.bundle.js, styles.bundle.map (styles) 10 kB {4} [initial] chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 2.64 MB [initial] chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] webpack: Compiled successfully.
browser don’t refresh. <F5> do not solve the problem
rerun ng serve
=> change available
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (1 by maintainers)
Commits related to this issue
- fix(@ngtools/webpack): change of CSS no longer breaks rebuild Fixes #4326 Fixes #4329 — committed to Brocco/angular-cli by Brocco 7 years ago
- fix(@ngtools/webpack): change of CSS no longer breaks rebuild Fixes #4326 Fixes #4329 — committed to Brocco/angular-cli by Brocco 7 years ago
- fix(@ngtools/webpack): change of CSS no longer breaks rebuild (#4334) Fixes #4326 Fixes #4329 — committed to angular/angular-cli by Brocco 7 years ago
- fix(@ngtools/webpack): change of CSS no longer breaks rebuild (#4334) Fixes #4326 Fixes #4329 — committed to MRHarrison/angular-cli by Brocco 7 years ago
Can you try
npm install --save @ngtools/webpack@1.2.4
to see if that fixes the issue?I have noticed this on VS2017 15.7.1 ,dotnet core 2.1 and Angular/Angular-CLI ^6.0.3
(I removed webpack from packages completely - The angular add new does not use it so I nuked it too based on the dotnet core 2 template based on angular 5 (not the dot net core 1 template based on angualr 4))
I realised it was serving an old build for some reason. Where does dotnet core serve build from? the /dist directory obviously. I deleted everything in the /dist directory. Refreshed the page on the port VS gave me and bam! It started working again with auto rebuild and auto refresh.
I think if something is in the dist folder then dotnet will NOT proxy to the CLI server. Make sure its clean
I am facing the same problem now.
@angular/cli: 1.2.0
It detect the changes on .ts and html files, it says that it’s compiling, the browser refreshes but nothing change. I can delete everything from many .ts files and it don’t even show an error. Only way to see the changes is stopping and ng serve again