From d858c23c3748e2268a7f66c1799c9a28f8aa6fe6 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Wed, 23 Aug 2017 14:00:44 -0300 Subject: [PATCH] Add friendly-errors-webpack-plugin. --- package.json | 1 + resources/assets/build/webpack.config.js | 2 ++ yarn.lock | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/package.json b/package.json index dfcd97c..801f137 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "eslint-plugin-import": "~2.7", "extract-text-webpack-plugin": "~3.0", "file-loader": "^0.11.2", + "friendly-errors-webpack-plugin": "^1.6.1", "imagemin-mozjpeg": "~6.0", "imagemin-webpack-plugin": "~1.5.0-beta.0", "import-glob": "~1.5", diff --git a/resources/assets/build/webpack.config.js b/resources/assets/build/webpack.config.js index 87ff36e..d37eb60 100644 --- a/resources/assets/build/webpack.config.js +++ b/resources/assets/build/webpack.config.js @@ -6,6 +6,7 @@ const CleanPlugin = require('clean-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const StyleLintPlugin = require('stylelint-webpack-plugin'); const CopyGlobsPlugin = require('copy-globs-webpack-plugin'); +const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); const config = require('./config'); @@ -175,6 +176,7 @@ let webpackConfig = { failOnError: !config.enabled.watcher, syntax: 'scss', }), + new FriendlyErrorsWebpackPlugin(), ], }; diff --git a/yarn.lock b/yarn.lock index 924f321..1b5a23b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,6 +1768,12 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +error-stack-parser@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.1.tgz#a3202b8fb03114aa9b40a0e3669e48b2b65a010a" + dependencies: + stackframe "^1.0.3" + es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: version "0.10.29" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.29.tgz#768eb2dfc4957bcf35fa0568f193ab71ede53fd8" @@ -2286,6 +2292,14 @@ fresh@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.3.0.tgz#651f838e22424e7566de161d8358caa199f83d4f" +friendly-errors-webpack-plugin@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.6.1.tgz#e32781c4722f546a06a9b5d7a7cfa28520375d70" + dependencies: + chalk "^1.1.3" + error-stack-parser "^2.0.0" + string-length "^1.0.1" + fs-extra@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -5699,6 +5713,10 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +stackframe@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b" + stat-mode@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502" @@ -5759,6 +5777,12 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"