diff options
author | Yukai Huang | 2016-11-03 13:59:25 +0800 |
---|---|---|
committer | Yukai Huang | 2016-11-03 13:59:25 +0800 |
commit | 689b1dc4d6f438a6e58ee354d71ee4f2def11eae (patch) | |
tree | 9e6ad0e9cab06332fc1b80a2a99067c6d4945694 | |
parent | da9fe2b2b5a3e00a12b706c547f77431c346149e (diff) |
Add optimize-css webpack plugin
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | webpack.production.js | 4 |
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() ] }]; |