fix(usable): Export locals if available(#128)

master
José Moreira 2016-06-01 12:57:25 +01:00 committed by Joshua Wiens
parent 43910f3356
commit e280cb6bd9
1 changed files with 1 additions and 1 deletions

View File

@ -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;",