score:3

This is what style-loader do:

- Adds CSS to the DOM by injecting a tag

& this is what ExtractTextWebpackPlugin do:

- extract text from a bundle, or bundles, into a separate file.

You'll probably never need to do both at one place but it's great to have inlining as a fallback to when ExtractTextWebpackPlugin fails.

window isn't defined, because there isn't any during CSS extraction. then you can try this:

{ test: /\.css$/, use: ExtractTextPlugin.extract({ fallback: 'style-loader', use: [ 'css-loader' ] }) },

Related Query

More Query from same tag