diff --git a/example/index.html b/example/index.html index 341eebd4..8710f979 100644 --- a/example/index.html +++ b/example/index.html @@ -6,6 +6,7 @@ This is an example + + diff --git a/package.json b/package.json index defae628..a23ad57d 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "eslint-loader": "^1.2.1", "eslint-plugin-react": "^5.1.1", "exports-loader": "^0.6.3", + "extract-text-webpack-plugin": "^1.0.1", "express": "^4.13.4", "file-loader": "^0.8.5", "immutable": "^3.7.6", diff --git a/webpack.config.js b/webpack.config.js index 66e20d7e..b312cf01 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ /* global module, __dirname, require */ var webpack = require('webpack'); +var ExtractTextPlugin = require('extract-text-webpack-plugin'); var path = require('path'); module.exports = { @@ -12,7 +13,7 @@ module.exports = { { test: /\.json$/, loader: 'json-loader' }, { test: /\.css$/, - loader: 'style!css?modules&importLoaders=1!postcss' + loader: ExtractTextPlugin.extract("style", "css?modules&importLoaders=1!postcss"), }, { loader: 'babel', @@ -33,6 +34,7 @@ module.exports = { ], plugins: [ + new ExtractTextPlugin('cms.css', { allChunks: true }), new webpack.ProvidePlugin({ 'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch' })