Skip to content

Commit

Permalink
Made webpack 2 to work with extract-text-webpack-plugin 2 by using ol…
Browse files Browse the repository at this point in the history
…d rule attributes 'loader' and 'query' instead of 'use' and 'options'. See webpack-contrib/extract-text-webpack-plugin#282 (comment) and webpack-contrib/extract-text-webpack-plugin#265 (comment)
  • Loading branch information
farcejofre committed Jan 22, 2017
1 parent 36987b3 commit 7f4c935
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpack = require('webpack');

module.exports = {
context: __dirname,
Expand All @@ -17,10 +18,17 @@ module.exports = {
}, {
test: /\.css$/,
include: /node_modules/,
use: ["style-loader", ExtractTextPlugin.extract({ fallbackLoader: "style-loader", loader: [ "css-loader?modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]", "postcss-loader" ] })]
loader: ExtractTextPlugin.extract({ fallbackLoader: "style-loader", loader: [
{
loader: "css-loader",
query: { modules: true, importLoaders: 1, localIdentName: "[name]__[local]__[hash:base64:5]" }
}, {
loader: "postcss-loader"
}
] })
}]
},
plugins: [
new ExtractTextPlugin({ filename: 'bundle.css', allChunks: true })
new ExtractTextPlugin({ filename: 'bundle.css' })
]
};

0 comments on commit 7f4c935

Please sign in to comment.