Skip to content

Commit

Permalink
fix(usable): Export locals if available(#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
José Moreira authored and joshwiens committed Mar 15, 2017
1 parent 43910f3 commit e280cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion useable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand Down

0 comments on commit e280cb6

Please sign in to comment.