summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukai Huang2016-11-03 13:59:25 +0800
committerYukai Huang2016-11-03 13:59:25 +0800
commit689b1dc4d6f438a6e58ee354d71ee4f2def11eae (patch)
tree9e6ad0e9cab06332fc1b80a2a99067c6d4945694
parentda9fe2b2b5a3e00a12b706c547f77431c346149e (diff)
Add optimize-css webpack plugin
Diffstat (limited to '')
-rw-r--r--package.json1
-rw-r--r--webpack.production.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/package.json b/package.json
index 96b9c7e2..57e31ccf 100644
--- a/package.json
+++ b/package.json
@@ -137,6 +137,7 @@
"json-loader": "^0.5.4",
"less": "^2.7.1",
"less-loader": "^2.2.3",
+ "optimize-css-assets-webpack-plugin": "^1.3.0",
"script-loader": "^0.7.0",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
diff --git a/webpack.production.js b/webpack.production.js
index a4dfd248..13aad6bd 100644
--- a/webpack.production.js
+++ b/webpack.production.js
@@ -2,6 +2,7 @@ var baseConfig = require('./webpackBaseConfig');
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
+var OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
module.exports = [Object.assign({}, baseConfig, {
plugins: baseConfig.plugins.concat([
@@ -52,6 +53,7 @@ module.exports = [Object.assign({}, baseConfig, {
'NODE_ENV': JSON.stringify('production')
}
}),
- new ExtractTextPlugin("html.min.css")
+ new ExtractTextPlugin("html.min.css"),
+ new OptimizeCssAssetsPlugin()
]
}];