Skip to content

Commit

Permalink
fix(start): Show friendly errors from dev server in terminal (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Nov 26, 2018
1 parent 550cf74 commit f958438
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/makeWebpackConfig.js
Expand Up @@ -2,6 +2,7 @@ const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');

const playroomPath = path.resolve(__dirname, '..');
const examplesPath = path.resolve(playroomPath, 'examples');
Expand Down Expand Up @@ -94,7 +95,8 @@ module.exports = (playroomConfig, options) => {
title: playroomConfig.title
? `Playroom | ${playroomConfig.title}`
: 'Playroom'
})
}),
...(options.production ? [] : [new FriendlyErrorsWebpackPlugin()])
],
devtool: options.production ? 'none' : 'eval-source-map'
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -62,6 +62,7 @@
"css-loader": "^1.0.0",
"dedent": "^0.7.0",
"find-up": "^3.0.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.8.1",
"less-loader": "^4.1.0",
Expand Down
21 changes: 21 additions & 0 deletions yarn.lock
Expand Up @@ -2889,6 +2889,13 @@ error-ex@^1.2.0, error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.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"

es-abstract@^1.5.1, es-abstract@^1.7.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
Expand Down Expand Up @@ -3588,6 +3595,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@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd"
Expand Down Expand Up @@ -7747,6 +7763,11 @@ ssri@^6.0.0:
dependencies:
figgy-pudding "^3.5.1"

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==

staged-git-files@1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.2.tgz#4326d33886dc9ecfa29a6193bf511ba90a46454b"
Expand Down

0 comments on commit f958438

Please sign in to comment.