-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Repro steps
- Compare result of running
ng --watch --stats-json
- to the result of running
ng --stats-json
Observed behavior
ng --stats-json
produces a stats.json
file.
ng --watch --stats-json
does not produce a stats.json
file.
Desired behavior
It should be possible to watch and to produce the stats.json
file.
If this is not possible, and these two flag settings are mutually exclusive, it'd be nice if --help
or wiki mentioned it.
Usecase:
I'm developing a custom build system for an electron application which is comprised of many angular apps. ng --watch
speeds up our development cycle, but the initial hit of building many apps at application startup is a killer. I plan to use the output of prior --watch --stats-json
builds to fingerprint the filesystem, and thus only perform a build if the modified time of any of the modules of an angular app have changed.
Thus, I'd like stats.json
to be emitted every time that the webpack compiler callback is invoked.
Mention any other details that might be useful
I can't think of a good reason why stats.json
isn't emitted during --watch
builds.
Relevant code location https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/tasks/build.ts#L61