You may want to use style-loader
as a before
argument in extract
function.
Here's the native implementation:
ExtractTextPlugin.extract = function(before, loader, options) {
if(typeof loader === "string") {
return [
ExtractTextPlugin.loader(mergeOptions({omit: before.split("!").length, extract: true, remove: true}, options)),
before,
loader
].join("!");
} else {
options = loader;
loader = before;
return [
ExtractTextPlugin.loader(mergeOptions({remove: true}, options)),
loader
].join("!");
}
};
So basicaly what you need to do is:
{
test: /.sass$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract('style-loader', 'css!sass?indentedSyntax=true&sourceMap=true')
},
if you for example use sass
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…