From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- .../vuepress-html-webpack-plugin/lib/errors.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 node_modules/vuepress-html-webpack-plugin/lib/errors.js (limited to 'node_modules/vuepress-html-webpack-plugin/lib/errors.js') diff --git a/node_modules/vuepress-html-webpack-plugin/lib/errors.js b/node_modules/vuepress-html-webpack-plugin/lib/errors.js new file mode 100644 index 00000000..2b946dad --- /dev/null +++ b/node_modules/vuepress-html-webpack-plugin/lib/errors.js @@ -0,0 +1,23 @@ +'use strict'; +const PrettyError = require('pretty-error'); +const prettyError = new PrettyError(); +prettyError.withoutColors(); +prettyError.skipPackage(['html-plugin-evaluation']); +prettyError.skipNodeFiles(); +prettyError.skip(function (traceLine) { + return traceLine.path === 'html-plugin-evaluation'; +}); + +module.exports = function (err, context) { + return { + toHtml: function () { + return 'Html Webpack Plugin:\n
\n' + this.toString() + '
'; + }, + toJsonHtml: function () { + return JSON.stringify(this.toHtml()); + }, + toString: function () { + return prettyError.render(err).replace(/webpack:\/\/\/\./g, context); + } + }; +}; -- cgit v1.2.3