我不敢相信我发现了这一点.这正是我想要的.祝好运.
var ProgressHook = new webpack.ProgressPlugin(function(percentage, msg) { if (percentage==0){ // pre-hook code (before webpack compiles ) } else if (percentage==1){ // post-hook code (after webpack compiles ) } })