Commit 3c4a1075 authored by Evan You's avatar Evan You

better dev output

parent a70341d5
......@@ -20,10 +20,7 @@ module.exports = function setupDevServer (app, cb) {
const clientCompiler = webpack(clientConfig)
const devMiddleware = require('webpack-dev-middleware')(clientCompiler, {
publicPath: clientConfig.output.publicPath,
stats: {
colors: true,
chunks: false
}
noInfo: true
})
app.use(devMiddleware)
clientCompiler.plugin('done', () => {
......
const path = require('path')
const vueConfig = require('./vue-loader.config')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const isProd = process.env.NODE_ENV === 'production'
module.exports = {
devtool: '#source-map',
devtool: isProd
? false
: '#cheap-module-eval-source-map',
entry: {
app: './src/entry-client.js',
vendor: [
......@@ -52,6 +57,10 @@ module.exports = {
]
},
performance: {
hints: process.env.NODE_ENV === 'production' ? 'warning' : false
}
maxEntrypointSize: 300000,
hints: isProd ? 'warning' : false
},
plugins: isProd ? [] : [
new FriendlyErrorsPlugin()
]
}
......@@ -5,6 +5,7 @@ const VueSSRPlugin = require('vue-ssr-webpack-plugin')
module.exports = merge(base, {
target: 'node',
devtool: '#source-map',
entry: './src/entry-server.js',
output: {
filename: 'server-bundle.js',
......
......@@ -36,6 +36,7 @@
"buble-loader": "^0.4.1",
"css-loader": "^0.27.3",
"file-loader": "^0.10.1",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.28.0",
"rimraf": "^2.6.1",
"stylus": "^0.54.5",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment