Skip to content

Commit e280cb6

Browse files
José Moreirajoshwiens
authored andcommitted
fix(usable): Export locals if available(#128)
1 parent 43910f3 commit e280cb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

useable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ module.exports.pitch = function(remainingRequest) {
1313
"var dispose;",
1414
"var content = require(" + loaderUtils.stringifyRequest(this, "!!" + remainingRequest) + ");",
1515
"if(typeof content === 'string') content = [[module.id, content, '']];",
16+
"if(content.locals) exports.locals = content.locals;",
1617
"exports.use = exports.ref = function() {",
1718
" if(!(refs++)) {",
18-
" exports.locals = content.locals;",
1919
" dispose = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "addStyles.js")) + ")(content, " + JSON.stringify(query) + ");",
2020
" }",
2121
" return exports;",

0 commit comments

Comments
 (0)