Webpack progress using node.js API -
is there way access webpack's progress while using node.js api? i'm familiar --progress flag using cli.
the webpack cli uses progressplugin log progress of compilation.
var progressplugin = require('webpack/lib/progressplugin'); var compiler = webpack(config); compiler.apply(new progressplugin(function(percentage, msg) { console.log((percentage * 100) + '%', msg); })); compiler.run(function(err, stats) { // ... });
here link compiler documentation , progressplugin documentation.
Comments
Post a Comment