-
在使用
compression-webpack-plugin插件时报这个错误,原因是版本问题。ERROR TypeError: Cannot read property 'tapPromise' of undefined TypeError: Cannot read property 'tapPromise' of undefined -
安装插件的时候默认最新版本,但是可能脚手架还不支持这个版本,所以需要降低插件版本进行使用,这边在安装的时候最新版本为
v9.2.0,降到v6.1.1进行使用$ npm install compression-webpack-plugin@6.1.1 -
然后重新打包正常!