hey-cli icon indicating copy to clipboard operation
hey-cli copied to clipboard

webpack的plugins如何配置?

Open luterc opened this issue 6 years ago • 0 comments

文档中描述:

可以在hey.conf.js中webpack配置项中扩张(扩展?)配置以下属性: plugins module

尝试:

npm i --save-dev terser-webpack-plugin
const TerserPlugin = require('terser-webpack-plugin')
webpack:{
...
//代码混淆
plugins: [new TerserPlugin()],
....

}
报错:
 HEY CLI v2.7.1 
[HEY] Can't find  hey.config.js or package.json 'hey' param. 

请问:以terser-webpack-plugin插件为例,请问应该如何配置?

luterc avatar Oct 16 '19 11:10 luterc