Skip to content

More accurate progress reporting in ng build #19181

Open
@dgp1130

Description

@dgp1130

🚀 Feature request

When running ng build, the progress percentage is limited to Webpack execution which is only one component of the build. This means the reported progress is not very helpful or useful. Ideally, this should reflect the entirety of the ng build process to give more accurate measurement.

Users tend to think of percentage progress as representing time the process with take. Since it is very hard to know how long a given build step will take (for example, tsc and Terser tend to take the longest, while index file generation is pretty quick), it may make more sense to report steps rather than percentage. The CLI could print "Executing step 4/9 - Compiling TypeScript" to be more clear that 44% of build time has not passed, but rather we're running the 4th of 9 build steps, each of which could take an unspecified and non-equivalent length of time. We should also include a spinner just to show that work is being done, since individual build steps may take a long time and we don't want the user to think the CLI is frozen when it is not.

Ideally, we would have such progress reporting in all non-trivial CLI commands, but for now, we'll limit this issue to just ng build and ng serve, which is where users will be spending 99% of their time anyways.

Command (mark with an x)

  • build

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions