Skip to content

ng build --prod --watch compiles app state before the save #5137

Closed
@bklik

Description

@bklik

Description:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions