ng build --prod --watch compiles app state before the save
See original GitHub issueDescription:
While running a build watch with the ‘–prod’ or ‘–aot’ options, the results to dist seem to be one save behind. Meaning, if I make a change and save, the change is detected and the project builds, however the results are the state of the app before the change. If I make another change, like adding a new line to a file, the change is detected and the project built, with the results of the previous save but not capturing the new lines added.
Note: This issue goes away if the ‘–prod’ or ‘–aot’ options are not used.
OS?
Windows 10
Versions.
@angular/cli: 1.0.0-beta.30 node: 6.9.5 os: win32 x64 @angular/common: 2.4.8 @angular/compiler: 2.4.8 @angular/core: 2.4.8 @angular/forms: 2.4.8 @angular/http: 2.4.8 @angular/platform-browser: 2.4.8 @angular/platform-browser-dynamic: 2.4.8 @angular/router: 3.4.8 @angular/cli: 1.0.0-beta.30 @angular/compiler-cli: 2.4.8
Repro steps.
ng new test-app
ng build --prod --watch
or
ng build --aot --watch
or
ng build --prod --aot --watch
The log given by the failure.
None
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
I investigated a bit more and this doesn’t seem to happen on all changes.
I can reproduce when changing a component template, but not when changing the component itself (changes are immediately reflected in this case).
So this seems related to the child compilers we use.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.