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