search

Home  >  Q&A  >  body text

node.js - webpack 图片压缩没起作用

new ImageminPlugin({
        disable: process.env.NODE_ENV !== 'production', // Disable during development 
          pngquant: {
            quality: '95-100'
          }
    })
  ------------------------------------------------------------------  
 new ImageminPlugin({ test: 'images/**' }),

---------------------------------------------------------

   new ImageminPlugin({
  test: 'bigpngs/**',
  optipng: {
    optimizationLevel: 9
  }
})

webpack配置中,压缩图片的这几种方式运行后图片并没有任何变化,请问是什么原因呢,有完整的配置实例么

怪我咯怪我咯2873 days ago402

reply all(0)I'll reply

No reply
  • Cancelreply