From e280cb6bd9bd696a0952c63068e0c3aef6b85b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Moreira?= Date: Wed, 1 Jun 2016 12:57:25 +0100 Subject: [PATCH] fix(usable): Export locals if available(#128) --- useable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/useable.js b/useable.js index af5a390..e2099e2 100644 --- a/useable.js +++ b/useable.js @@ -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;",