I wanted the same feature a while back but realized this is already supported by webpack. My solution looks like this:
var sass = encodeURIComponent(jsonToSassVars(sassGlobals));
var webpackConfig = {
module: {
loaders:[
{test: /.scss$/, loader: "style!css!sass!prepend?data=" + sass}
]
},
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…