Skip to content

add ProgressPlugin for webpack for verbose mode #207

@shazron

Description

@shazron

Add it right after this line:

const compiler = webpack(webpackConfig)

Code:

    const ProgressPlugin = require('webpack/lib/ProgressPlugin')
    new ProgressPlugin((percentage, msg, ...args) => {
      // Custom progress handling logic
      console.log((new Date()).toISOString(), '::', (percentage * 100).toFixed(2) + '%', msg, ...args);
    }).apply(compiler)

Sample output:

❯ aio app build
⠋ Building actions for 'application'
2025-03-12T05:35:27.648Z :: 0.00% [0]
2025-03-12T05:35:27.648Z :: 1.00% [0] setup before run
2025-03-12T05:35:27.648Z :: 1.00% [0] setup before run NodeEnvironmentPlugin
2025-03-12T05:35:27.648Z :: 1.00% [0] setup before run
2025-03-12T05:35:27.648Z :: 2.00% [0] setup run
2025-03-12T05:35:27.648Z :: 2.00% [0] setup run
2025-03-12T05:35:27.650Z :: 4.00% [0] setup normal module factory
2025-03-12T05:35:27.650Z :: 4.00% [0] setup normal module factory
2025-03-12T05:35:27.650Z :: 5.00% [0] setup context module factory
2025-03-12T05:35:27.650Z :: 5.00% [0] setup context module factory
2025-03-12T05:35:27.650Z :: 6.00% [0] setup before compile
2025-03-12T05:35:27.650Z :: 6.00% [0] setup before compile ProgressPlugin
2025-03-12T05:35:27.650Z :: 6.00% [0] setup before compile
2025-03-12T05:35:27.650Z :: 7.00% [0] setup compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions