- 安装插件
npm install compression-webpack-plugin --save-dev
- 若报错:
Cannot read property 'tapPromise' of undefined
- 卸载高版本,安装低版本
npm uninstall compression-webpack-plugin
npm i compression-webpack-plugin@5.0.1
- 修改vue.config.js文件
<
npm install compression-webpack-plugin --save-dev
Cannot read property 'tapPromise' of undefined
npm uninstall compression-webpack-plugin
npm i compression-webpack-plugin@5.0.1
<