Skip to content

Commit

Permalink
refactor: refactor usages of module.loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Burhanuddin Udaipurwala committed May 26, 2023
1 parent 30f4da8 commit 8bf6d59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dependencies/CommonJsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ class CommonJsPlugin {
)
);
parser.hooks.expression
.for("module.loaded")
.for(RuntimeGlobals.moduleLoaded)
.tap(PLUGIN_NAME, expr => {
parser.state.module.buildInfo.moduleConcatenationBailout =
"module.loaded";
RuntimeGlobals.moduleLoaded;
const dep = new RuntimeRequirementsDependency([
RuntimeGlobals.moduleLoaded
]);
Expand Down
2 changes: 1 addition & 1 deletion lib/javascript/JavascriptModulesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ class JavascriptModulesPlugin {
? Template.asString([
"",
"// Flag the module as loaded",
"module.loaded = true;",
`${RuntimeGlobals.moduleLoaded} = true;`,
""
])
: "",
Expand Down

0 comments on commit 8bf6d59

Please sign in to comment.