From 2c613eb1298e26ed4d3c1d9761e8c694260cadbb Mon Sep 17 00:00:00 2001 From: Francesco Soncina Date: Sun, 28 Aug 2016 14:01:43 +0200 Subject: [PATCH] add webpack-dashboard, fixes #138 (#152) --- package.json | 3 ++- webpack.config.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4110e840..7b6787a4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", - "server": "webpack-dev-server --inline --progress --port 8080", + "server": "webpack-dashboard -- webpack-dev-server --inline --progress --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", @@ -82,6 +82,7 @@ "typings": "^1.0.4", "url-loader": "^0.5.6", "webpack": "^1.12.13", + "webpack-dashboard": "^0.1.8", "webpack-dev-server": "^1.14.1" } } diff --git a/webpack.config.js b/webpack.config.js index 18416561..1a6248c7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,6 +8,7 @@ var autoprefixer = require('autoprefixer'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); +var DashboardPlugin = require('webpack-dashboard/plugin'); /** * Env @@ -164,6 +165,10 @@ module.exports = function makeWebpackConfig() { }) ]; + if (!isTest && !isProd) { + config.plugins.push(new DashboardPlugin()); + } + if (!isTest) { config.plugins.push( // Generate common chunks if necessary