Webpack的Imagemin插件 这是一个简单的插件,使用压缩项目中的所有图像。 安装 npm install imagemin-webpack-plugin 要求节点> = 4.0.0 用法示例 var ImageminPlugin = require ( 'imagemin-webpack-plugin' ) . default // Or if using ES2015: // import ImageminPlugin from 'imagemin-webpack-plugin' module . exports = { plugins : [ // Make sure that the plugin is after any plugins that add images new ImageminPlugin ( { disable : p