diff --git a/webpack.config.js b/webpack.config.js index d2cf3dc75..6a436f433 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,8 @@ var baseConfig = require('./webpackBaseConfig'); +var ExtractTextPlugin = require("extract-text-webpack-plugin"); -module.exports = baseConfig; +module.exports = Object.assign({}, baseConfig, { + plugins: baseConfig.plugins.concat([ + new ExtractTextPlugin("[name].css") + ]) +}); diff --git a/webpack.production.js b/webpack.production.js index 5fe6f2943..1a55e6152 100644 --- a/webpack.production.js +++ b/webpack.production.js @@ -1,6 +1,7 @@ var baseConfig = require('./webpackBaseConfig'); var webpack = require('webpack'); var path = require('path'); +var ExtractTextPlugin = require("extract-text-webpack-plugin"); module.exports = Object.assign({}, baseConfig, { plugins: baseConfig.plugins.concat([ @@ -15,7 +16,8 @@ module.exports = Object.assign({}, baseConfig, { }, mangle: false, sourceMap: false - }) + }), + new ExtractTextPlugin("[name].[hash].css") ]), output: { diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 4cc943dcc..560635cae 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -15,7 +15,6 @@ module.exports = { "moment": "moment", "Handlebars": "handlebars" }), - new ExtractTextPlugin("[name].css"), new webpack.optimize.CommonsChunkPlugin({ names: ["cover", "index", "pretty", "slide", "vendor"], children: true,