yoowinsu / blog

issues blog
17 stars 3 forks source link

vue-cli 2.x中启用Gzip压缩报错 #83

Open yoowinsu opened 5 years ago

yoowinsu commented 5 years ago

config文件夹中配置Gzip压缩,配置

productionGzip: true

但是需要先安装

 // npm install --save-dev compression-webpack-plugin

安装之后打包却报了下面的错误

throw new ValidationError(ajv.errors, name);
    ^
ValidationError: Compression Plugin Invalid Options
options should NOT have additional properties

后来把compression-webpack-plugin的版本降到了1.1.11,重装之后打包就没有再报错了