Error compressing packaged resources with WEBPACK

/ / package file
if (config.build.outputZip) {
var ZipPlugin=require ("zip-webpack-plugin")
webpackConfig.plugins.push (

)
new ZipPlugin({
  path:config.build.assetsRoot,
  filename:"output.zip"
})

)

}

error message

compiler.hooks.emit.tapAsync(ZipPlugin.name, function(compilation, callback) {
               ^

TypeError: Cannot read property "emit" of undefined

Mar.17,2021

this problem is caused by the high version of webpack-zip-plugin. I don't know which plug-in is incompatible with it. I can use version 2.0.0


this plugin has not been used, so it is recommended that you use this plugin webpack-zip-plugin. I have no problem with this.

var WebpackZipPlugin = require('webpack-zip-plugin');

        plugins.push(new WebpackZipPlugin({
            initialFile: `build/${subPath}/`,  // (dist)
            endPath: `build/zip/`,  // './'
            zipName: `${srcPath}_${versionWithoutTime}` // 
        }));

how to solve the problem?

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-1b3b2dc-2c29f.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-1b3b2dc-2c29f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?