首页 > Web开发 > 详细

webpack篇(三):serve启动 打印台友好提示

时间:2021-04-10 00:28:29      阅读:28      评论:0      收藏:0      [点我收藏+]

方式一:stats对象

方式二:friendly-errors-webpack-plugin插件

npm i --save-D friendly-errors-webpack-plugin

webpack.config.js

plugins: [
    new FriendlyErrorsWebpackPlugin({
      compilationSuccessInfo: {
        messages: [You application is running here http://localhost:3000],
        notes: [Some additionnal notes to be displayed unpon successful compilation]
      },
      onErrors: function (severity, errors) {
        // You can listen to errors transformed and prioritized by the plugin
        // severity can be ‘error‘ or ‘warning‘
      },
    })
  ]

 

webpack篇(三):serve启动 打印台友好提示

原文:https://www.cnblogs.com/sxdjy/p/14637787.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!