Skip to content

Commit

Permalink
build(webpack): allow dev-server to run a production build
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveVanOpstal committed Dec 22, 2016
1 parent 7bae40b commit 5d8dbca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions config/build/webpack.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ module.exports = function(options) {

performance: {hints: !options.dev},

if (options.dev) {
config.devServer = {
devServer: {
port: settings.httpServer.port,
host: settings.httpServer.host,
historyApiFallback: true,
watchOptions: {aggregateTimeout: 300, poll: 1000}
}
} else {
};

if (!options.dev) {
config.plugins.push(new webpack.optimize.UglifyJsPlugin({mangle: true}));
config.plugins.push(new WebpackMd5Hash());
}
Expand Down

0 comments on commit 5d8dbca

Please sign in to comment.