mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Adds friendly error plugin
This commit is contained in:
parent
7f0f3ae940
commit
becf2f2a62
|
@ -53,6 +53,7 @@
|
|||
"babel-runtime": "6.11.6",
|
||||
"cross-spawn": "4.0.2",
|
||||
"del": "2.2.2",
|
||||
"friendly-errors-webpack-plugin": "1.1.0",
|
||||
"glamor": "2.17.10",
|
||||
"glob-promise": "1.0.6",
|
||||
"htmlescape": "1.1.1",
|
||||
|
@ -66,11 +67,11 @@
|
|||
"react-dom": "15.3.2",
|
||||
"react-hot-loader": "3.0.0-beta.6",
|
||||
"send": "0.14.1",
|
||||
"sockjs-client": "1.1.1",
|
||||
"strip-ansi": "3.0.1",
|
||||
"url": "0.11.0",
|
||||
"webpack": "1.13.2",
|
||||
"webpack-dev-server": "1.16.2",
|
||||
"sockjs-client": "1.1.1",
|
||||
"write-file-webpack-plugin": "3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -7,6 +7,7 @@ import WatchPagesPlugin from './plugins/watch-pages-plugin'
|
|||
import WatchRemoveEventPlugin from './plugins/watch-remove-event-plugin'
|
||||
import DynamicEntryPlugin from './plugins/dynamic-entry-plugin'
|
||||
import DetachPlugin from './plugins/detach-plugin'
|
||||
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
|
||||
|
||||
export default async function createCompiler (dir, { hotReload = false } = {}) {
|
||||
dir = resolve(dir)
|
||||
|
@ -49,7 +50,10 @@ export default async function createCompiler (dir, { hotReload = false } = {}) {
|
|||
new DynamicEntryPlugin(),
|
||||
new UnlinkFilePlugin(),
|
||||
new WatchRemoveEventPlugin(),
|
||||
new WatchPagesPlugin(dir)
|
||||
new WatchPagesPlugin(dir),
|
||||
new FriendlyErrorsWebpackPlugin({
|
||||
messages: ['Your application is running here http://localhost:3000']
|
||||
})
|
||||
] : [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: { warnings: false },
|
||||
|
|
|
@ -82,23 +82,8 @@ export default class HotReloader {
|
|||
publicPath: '/',
|
||||
hot: true,
|
||||
noInfo: true,
|
||||
clientLogLevel: 'warning',
|
||||
stats: {
|
||||
assets: false,
|
||||
children: false,
|
||||
chunks: false,
|
||||
color: false,
|
||||
errors: true,
|
||||
errorDetails: false,
|
||||
hash: false,
|
||||
modules: false,
|
||||
publicPath: false,
|
||||
reasons: false,
|
||||
source: false,
|
||||
timings: false,
|
||||
version: false,
|
||||
warnings: false
|
||||
}
|
||||
quiet: true,
|
||||
clientLogLevel: 'warning'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue