An error was reported when the webpack was packaged.

  javascript, vue.js


This is my configuration

if ( {
 const CompressionWebpackPlugin = require('compression-webpack-plugin')
 new CompressionWebpackPlugin({
 asset: '[path].gz[query]',
 algorithm: 'gzip',
 test: new RegExp(
 \ \. ('plus ('|') plus
 threshold: 10240,
 minRatio: 0.8

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