Skip to content

Commit 51629a4

Browse files
timsejoshwiens
authored andcommitted
fix: ensure userRequest stays unique (module.userRequest) (#58)
1 parent 3191765 commit 51629a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ module.exports.pitch = function(remainingRequest) {
3232
);
3333
this.cacheable && this.cacheable();
3434
if(!this.query) throw new Error("query parameter is missing");
35+
/*
36+
* Workaround until module.libIdent() in webpack/webpack handles this correctly.
37+
*
38+
* fixes:
39+
* - https://github.com/webpack-contrib/expose-loader/issues/55
40+
* - https://github.com/webpack-contrib/expose-loader/issues/49
41+
*/
42+
this._module.userRequest = this._module.userRequest + '-exposed';
3543
return accesorString(this.query.substr(1)) + " = " +
3644
"require(" + JSON.stringify("-!" + newRequestPath) + ");";
3745
};

0 commit comments

Comments
 (0)