fix(usable): Export locals if available(#128)
parent
43910f3356
commit
e280cb6bd9
|
@ -13,9 +13,9 @@ module.exports.pitch = function(remainingRequest) {
|
|||
"var dispose;",
|
||||
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ");",
|
||||
"if(typeof content === 'string') content = [[module.id, content, '']];",
|
||||
"if(content.locals) exports.locals = content.locals;",
|
||||
"exports.use = exports.ref = function() {",
|
||||
" if(!(refs++)) {",
|
||||
" exports.locals = content.locals;",
|
||||
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "addStyles.js")) + ")(content, " + JSON.stringify(query) + ");",
|
||||
" }",
|
||||
" return exports;",
|
||||
|
|
Loading…
Reference in New Issue