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

ng serve --aot serves stale app

Open jeffbcross opened this issue 10 years ago • 5 comments

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

El Capitan

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

beta.17 (experimental)

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

See this commit: https://github.com/jeffbcross/cli-aot-route-bug/commit/85bd5c6caec557344961a181987c797598d570d2

I just added a route config and a couple of components (though I don't think this is a router-specific issue).

  1. Serve the app using ng serve --aot
  2. App should work as expected
  3. Change a route config in src/app/app.module.ts (i.e. set homeRoute.component to ItemsComponent
  4. When page refreshes automatically, the old config will still be present (also happens after manually refreshing)
  5. Make any change to app.module.ts and save (like add a newline at the end of file)
  6. Page refreshes with configuration changes made in step 3.

jeffbcross avatar Oct 07 '16 20:10 jeffbcross

Note: I added a commit after the repro commit that would cause AoT to break because I added a then() to console log after bootstrapModule. Just remove that callback to get rid of Tried to find bootstrap code, but could not. message.

jeffbcross avatar Oct 07 '16 22:10 jeffbcross

Closing this as deprecated. We cannot reproduce this and the webpack plugin has improved a lot in the last 3 months.

hansl avatar Feb 10 '17 05:02 hansl

I'm still suffering this on beta.30.

konrad-garus avatar Feb 20 '17 18:02 konrad-garus

Still the same problem:

@angular/cli: 1.1.0 node: 6.11.0 os: win32 x64 @angular/animations: 4.2.5 @angular/common: 4.2.5 @angular/compiler: 4.2.5 @angular/core: 4.2.5 @angular/forms: 4.2.5 @angular/http: 4.2.5 @angular/platform-browser: 4.2.5 @angular/platform-browser-dynamic: 4.2.5 @angular/router: 4.2.5 @angular/cli: 1.1.0 @angular/compiler-cli: 4.2.5 @angular/language-service: 4.2.5

KrystianRos avatar Jul 07 '17 10:07 KrystianRos

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.