Skip to content

Commit d7a87ab

Browse files
committed
change __webpack_module_id__ to __webpack_module__.id
1 parent 612de99 commit d7a87ab

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/APIPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ class APIPlugin {
203203
);
204204

205205
parser.hooks.expression
206-
.for("__webpack_module_id__")
206+
.for("__webpack_module__.id")
207207
.tap("APIPlugin", expr => {
208208
parser.state.module.buildInfo.moduleConcatenationBailout =
209-
"__webpack_module_id__";
209+
"__webpack_module__.id";
210210
const dep = new ConstDependency(
211211
parser.state.module.moduleArgument + ".id",
212212
expr.range,

test/cases/parsing/api/id.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default __webpack_module_id__;
1+
export default __webpack_module__.id;

test/cases/parsing/api/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import id from "./id";
22
import mod from "./module";
33
import modType from "./typeof-module";
44

5-
it("should support __webpack_module_id__", () => {
5+
it("should support __webpack_module__.id", () => {
66
expect(typeof id).toMatch(/^(string|number)$/);
7-
expect(id).not.toBe(__webpack_module_id__);
7+
expect(id).not.toBe(__webpack_module__.id);
88
});
99

1010
it("should support __webpack_module__", () => {

0 commit comments

Comments
 (0)