-
Notifications
You must be signed in to change notification settings - Fork 513
CSS Modules: ExtractTextPlugin changes the format of the imported style object #348
Comments
+1 I'm experiencing the same issue. |
This turned out to be related to #330 for me. Before figuring out what was wrong (I was using @websash Maybe you are having some kind of related issue? This part is from your config: use: [
ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: 'css-loader'
}), {
loader: 'css-loader',
options: {
minimize: true,
modules: true,
importLoaders: true,
localIdentName: '[hash:6]'
}
}
], Maybe something like this would work: loader: ExtractTextPlugin.extract({
fallbackLoader: 'style-loader',
loader: {
loader: 'css-loader',
query: {
minimize: true,
modules: true,
importLoaders: true,
localIdentName: '[hash:6]'
}
}
}), You would have to do the same thing a bit further down in the config. I hope it helps! |
@Ephem thanx for the tip. Your config is definitely working for me 👍 I was sure I had to use |
#343 has been merged, included in https://github.com/webpack-contrib/extract-text-webpack-plugin/releases/tag/v2.0.0-rc.0 and published to npm as |
@Ephem that's cool, thanks. |
@Ephem thanks, that's work |
Been migrating to Webpack 2 and noticed my local CSS is not working with the new ExtractTextPlugin.
Consider this sample code:
Without ExtractTextPlugin I got this
style
:which is fine and expected.
Now when using ExtractTextPlugin I'm getting this format:
as if I'm supposed to use
style.locals.foobarLocal
now. Why is that?My test webpack config https://github.com/websash/webpack2-css-modules/blob/master/webpack.config.js
The text was updated successfully, but these errors were encountered: