angular-cli: Angular-cli doesn't watch for ALL files correctly.
Bug Report or Feature Request (mark with an x
)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.4.2 node: 7.5.0 os: win32 x64 @angular/common: 4.4.4 @angular/compiler: 4.4.4 @angular/core: 4.4.4 @angular/forms: 4.4.4 @angular/http: 4.4.4 @angular/platform-browser: 4.4.4 @angular/platform-browser-dynamic: 4.4.4 @angular/router: 4.4.4 @angular/cli: 1.4.2 @angular/compiler-cli: 4.4.4 typescript: 2.2.2
Repro steps.
- npm install
- ng serve
- change anything in src/app/store/application-state.ts (it is linked in component, which is used in app.module.ts) and SAVE = NO REBUILD
- Change (example) from storeData: string; to storeData: boolean; and RE-SAVE anything else where the watch is correctly watching = application successfully built, but it SHOULD NOT, because there is assignment: store.subscribe(x=> x.storeData = “pepa”) but type of storeData has been changed to boolean…
Desired functionality.
It should watch for all files correctly
Mention any other details that might be useful.
-
I have tried to change typescript to 2.4.0+ (because of breaking change in CHANGELOG) = NOT WORKING
-
i have tried to update globally angular-cli(1.4.5) and create new APP via ng new = with latest dependencies = NOT WORKING
BTW even with latest Angular-cli, typescript version in dev-dependencies is “~2.3.3” despite your required version in CHANGELOG
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (11 by maintainers)
Commits related to this issue
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to hansl/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to hansl/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to hansl/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to hansl/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to hansl/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to angular/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to angular/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to angular/angular-cli by hansl 7 years ago
- fix(@ngtools/webpack): fix rebuild speed regression See https://github.com/angular/angular-cli/issues/7995#issuecomment-336036482 for details. Fix regression introduced in https://github.com/angular... — committed to filipesilva/angular-cli by filipesilva 7 years ago
- fix(@ngtools/webpack): fix rebuild speed regression See https://github.com/angular/angular-cli/issues/7995#issuecomment-336036482 for details. Fix regression introduced in https://github.com/angular... — committed to angular/angular-cli by filipesilva 7 years ago
- fix(@ngtools/webpack): fix rebuild speed regression See https://github.com/angular/angular-cli/issues/7995#issuecomment-336036482 for details. Fix regression introduced in https://github.com/angular... — committed to angular/angular-cli by filipesilva 7 years ago
- fix(@ngtools/webpack): fix rebuild speed regression See https://github.com/angular/angular-cli/issues/7995#issuecomment-336036482 for details. Fix regression introduced in https://github.com/angular... — committed to angular/angular-cli by filipesilva 7 years ago
- fix(@ngtools/webpack): analyze the typescript file for additional dependencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, ... — committed to d2clouds/speedray-cli by hansl 7 years ago
- fix(@ngtools/webpack): fix rebuild speed regression See https://github.com/angular/angular-cli/issues/7995#issuecomment-336036482 for details. Fix regression introduced in https://github.com/angular... — committed to d2clouds/speedray-cli by filipesilva 7 years ago
After investigating, you’re correct in your assumption that it’s not the same issue.
The problem is 3 fold:
The only point where we actually have control is point 3 and we should look at dependencies inside TypeScript and tell webpack about TS’s dependency graph. I’ll come up with a fix soon.
Ok so I’m looking at the file online in https://unpkg.com/@ngtools/webpack@1.7.3/src/loader.js. You’re right, it’s quite different. We published stable (
1.7.3
) but also the beta (1.8.0-beta.4
), and a lot of code in that PR is only for the beta.What you want to change is:
This should be enough to test.
I’ll take a look and try to get some numbers to benchmark. Thank you.