Skip to content

webpack的plugins如何配置? #11

Description

@luterc

文档中描述:

可以在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插件为例,请问应该如何配置?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions