message-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

message-webpack-plugin

😘一个处理消息的webpack插件。

特性:友好的错误、警告消息,显示构建进度。

👉 github npm-version webpack nodejs license pull request

安装获取

yarn add message-webpack-plugin -D

npm install message-webpack-plugin -D

pnpm install message-webpack-plugin -D

使用方式

const MessageWebpackPlugin = require('message-webpack-plugin')

module.exports = {
  plugins: [new MessageWebpackPlugin()]
}
const MessageWebpackPlugin = require('message-webpack-plugin')

module.exports = {
  plugins: [
    new MessageWebpackPlugin({
      servePort: 8080,
      progress: true,
      onError(errors) {
        conosle.log(errors.join('\n\n'))
      }
    })
  ]
}

配置项

具体配置项的数据类型见types.ts

  • servePort devServe服务消息端口,用于开发环境输出默认访问地址提示。默认: 8080
  • progress 是否需要构建进度消息。 默认: true
  • onSuccess 编译完成回调。
  • onError 编译失败回调。
  • onWarning 编译警告回调。

Package Sidebar

Install

npm i message-webpack-plugin

Weekly Downloads

4

Version

0.0.10

License

MIT

Unpacked Size

18.7 kB

Total Files

20

Last publish

Collaborators

  • imccode