From de98e0b232509d5f40c135d540a70e415272ff85 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 3 May 2017 15:35:00 +0200 Subject: node_modules --- node_modules/html-webpack-plugin/lib/errors.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 node_modules/html-webpack-plugin/lib/errors.js (limited to 'node_modules/html-webpack-plugin/lib/errors.js') diff --git a/node_modules/html-webpack-plugin/lib/errors.js b/node_modules/html-webpack-plugin/lib/errors.js new file mode 100644 index 000000000..ddf3562b1 --- /dev/null +++ b/node_modules/html-webpack-plugin/lib/errors.js @@ -0,0 +1,23 @@ +'use strict'; +var PrettyError = require('pretty-error'); +var 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