change __webpack_module_id__ to __webpack_module__.id
This commit is contained in:
parent
612de998f1
commit
d7a87ab5bc
|
@ -203,10 +203,10 @@ class APIPlugin {
|
|||
);
|
||||
|
||||
parser.hooks.expression
|
||||
.for("__webpack_module_id__")
|
||||
.for("__webpack_module__.id")
|
||||
.tap("APIPlugin", expr => {
|
||||
parser.state.module.buildInfo.moduleConcatenationBailout =
|
||||
"__webpack_module_id__";
|
||||
"__webpack_module__.id";
|
||||
const dep = new ConstDependency(
|
||||
parser.state.module.moduleArgument + ".id",
|
||||
expr.range,
|
||||
|
|
|
@ -1 +1 @@
|
|||
export default __webpack_module_id__;
|
||||
export default __webpack_module__.id;
|
||||
|
|
|
@ -2,9 +2,9 @@ import id from "./id";
|
|||
import mod from "./module";
|
||||
import modType from "./typeof-module";
|
||||
|
||||
it("should support __webpack_module_id__", () => {
|
||||
it("should support __webpack_module__.id", () => {
|
||||
expect(typeof id).toMatch(/^(string|number)$/);
|
||||
expect(id).not.toBe(__webpack_module_id__);
|
||||
expect(id).not.toBe(__webpack_module__.id);
|
||||
});
|
||||
|
||||
it("should support __webpack_module__", () => {
|
||||
|
|
Loading…
Reference in New Issue