使用cnpm安装,npm容易出错
cnpm install --save-dev image-webpack-loader
chainWebpack: config => {config.module.rule('image').test(/\.(png|jpe?g|gif)(\?.*)?$/).use('image-webpack-loader').loader('image-webpack-loader').options({// 此处为ture的时候不会启用压缩处理,目的是为了开发模式下调试速度更快bypassOnDebug: true}).end()}