An error was reported when the webpack was packaged.

  javascript, vue.js

clipboard.png

This is my configuration

if (config.build.productionGzip) {
 const CompressionWebpackPlugin = require('compression-webpack-plugin')
 webpackConfig.plugins.push(
 new CompressionWebpackPlugin({
 asset: '[path].gz[query]',
 algorithm: 'gzip',
 test: new RegExp(
 \ \. ('plus
 Config.build.productiongzipextensions.join ('|') plus
 ')$'
 ),
 threshold: 10240,
 minRatio: 0.8
 })
 )
 bracket

compression-webpack-plugin ValidationError: Compression Plugin Invalid Options

Seeing this error, I checked the parameters carefully and went to the official website to see the parameter information and found no problem. It’s already a little difficult to start.

Not on the documentAssetThis configuration is redundant and needs to be removed. reading the document means it needs to be usedfilenameReplace