diff --git a/package.json b/package.json index 8247332f..86c03fe9 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "ethereumjs-util": "^5.1.4", "express": "^4.16.3", "flow-webpack-plugin": "^1.2.0", + "friendly-errors-webpack-plugin": "^1.7.0", "git-revision-webpack-plugin": "^3.0.3", "hdkey": "^0.8.0", "history": "^4.7.2", diff --git a/webpack/dev.babel.js b/webpack/dev.babel.js index 1d527a7a..4d5f71c3 100644 --- a/webpack/dev.babel.js +++ b/webpack/dev.babel.js @@ -1,6 +1,7 @@ import webpack from 'webpack'; import GitRevisionPlugin from 'git-revision-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; +import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'; import FlowWebpackPlugin from 'flow-webpack-plugin'; import WebpackBuildNotifierPlugin from 'webpack-build-notifier'; @@ -122,5 +123,6 @@ module.exports = { new webpack.NoEmitOnErrorsPlugin(), new webpack.HotModuleReplacementPlugin(), new webpack.NamedModulesPlugin(), + new FriendlyErrorsWebpackPlugin(), ], }; diff --git a/webpack/production.babel.js b/webpack/production.babel.js index 63294226..b3fd03da 100644 --- a/webpack/production.babel.js +++ b/webpack/production.babel.js @@ -2,9 +2,11 @@ import webpack from 'webpack'; import GitRevisionPlugin from 'git-revision-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; +import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import { SRC, BUILD, PUBLIC } from './constants'; + const gitRevisionPlugin = new GitRevisionPlugin(); module.exports = { @@ -80,5 +82,6 @@ module.exports = { new webpack.optimize.OccurrenceOrderPlugin(), new webpack.NoEmitOnErrorsPlugin(), new webpack.NamedModulesPlugin(), + new FriendlyErrorsWebpackPlugin(), ], }; diff --git a/yarn.lock b/yarn.lock index 143b3525..959c82ba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3371,6 +3371,13 @@ error-stack-parser@^1.3.6: dependencies: stackframe "^0.3.1" +error-stack-parser@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.2.tgz#4ae8dbaa2bf90a8b450707b9149dcabca135520d" + integrity sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw== + dependencies: + stackframe "^1.0.4" + error@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" @@ -4233,6 +4240,15 @@ fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" +friendly-errors-webpack-plugin@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz#efc86cbb816224565861a1be7a9d84d0aafea136" + integrity sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw== + dependencies: + chalk "^1.1.3" + error-stack-parser "^2.0.0" + string-width "^2.0.0" + from2@^2.1.0, from2@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -9209,6 +9225,11 @@ stackframe@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" +stackframe@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.0.4.tgz#357b24a992f9427cba6b545d96a14ed2cbca187b" + integrity sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw== + state-toggle@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.1.tgz#c3cb0974f40a6a0f8e905b96789eb41afa1cde3a"