node实现将打包后的文件转压缩包

效果:

package.json
devDependencies添加,其他版本安装可能会出错

"devDependencies": {
    "filemanager-webpack-plugin": "2.0.5"
}
// 将打包后的dist文件自动压缩成zip包
plugins.push(
  new FileManagerPlugin({
     onEnd: {
        // delete: [ './dist.zip'],
       archive: [{ source: './html', destination: './html.zip' }]
      }
}))
愿以往所学皆有所获
原文地址:https://www.cnblogs.com/Azune/p/14434826.html