Skip to content

Commit 47cfca4

Browse files
author
anonymousthing
committed
Add global hook for getLocalIdent
1 parent 1703721 commit 47cfca4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/loader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ module.exports = function(content, map) {
1919
var sourceMap = query.sourceMap || false;
2020
var resolve = createResolver(query.alias);
2121

22+
if (global && global.getLocalIdent) {
23+
query.getLocalIdent = global.getLocalIdent;
24+
}
25+
2226
if(sourceMap) {
2327
if (map) {
2428
if (typeof map === "string") {
@@ -108,7 +112,7 @@ module.exports = function(content, map) {
108112
return "\" + escape(require(" + loaderUtils.stringifyRequest(this, urlRequest) + ")) + \"";
109113
}.bind(this));
110114
}
111-
115+
112116
var exportJs = compileExports(result, importItemMatcher.bind(this), camelCaseKeys);
113117
if (exportJs) {
114118
exportJs = "exports.locals = " + exportJs + ";";

0 commit comments

Comments
 (0)