Webpack packing Times error

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(
        "\\.(" +
        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.


Hello, landlord! First of all, confirm what version of compression-webpack-plugin you installed? If it is the 1.x version, there will be no problem with the parameters as you write. If it is the 2.x version, then the parameter asset must be replaced with filename . A personal test is fine. Attach the document address: https://github.com/webpack-co.. You can check it yourself.


there is no asset configuration on the document. It is superfluous and needs to be removed. Reading the document means that you need to use filename instead of


landlord. Hello, how did you solve it? I also encountered the same question


found the answer, according to the method in this blog, install the plug-in with the version number and configure it successfully. https://www.cnblogs.com/dongh.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb60df-48378.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb60df-48378.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?