adobe / adobe/aio-lib-runtime

add ProgressPlugin for webpack for verbose mode

Open
#207 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
6
Forks
25
Avg merge
3d 10h
Merged PRs (30d)
2

Description

Add it right after this line:
https://github.com/adobe/aio-lib-runtime/blob/8d531a9898857741506cd9f1b028d8d0f93b4995/src/build-actions.js#L218

Code:
```javascript
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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.