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(
"\\.(" +
config.build.productionGzipExtensions.join("|") +
")$"
),
threshold: 10240,
minRatio: 0.8
})
)
}
compression-webpack-plugin ValidationError: Compression Plugin Invalid Options
when you see this error, you can check the parameters carefully, and you can also go to the official website to check the parameter information and don"t find anything wrong. I don"t know what to do with it.