Skip to content

Commit

Permalink
refactor: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Aug 5, 2024
1 parent 1d07f1f commit f22a965
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/ExternalModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,10 @@ class ExternalModule extends Module {
topLevelDeclarations: new Set(),
module: compilation.outputOptions.module
};
let { request, externalType } = this._getRequestAndExternalType();
const { request, externalType } = this._getRequestAndExternalType();
this.buildMeta.exportsType = "dynamic";
let canMangle = false;
this.clearDependenciesAndBlocks();

switch (externalType) {
case "this":
this.buildInfo.strict = false;
Expand Down Expand Up @@ -624,7 +623,6 @@ class ExternalModule extends Module {
canMangle = false;
}
}
break;
}

if (type === "import") {
Expand All @@ -638,8 +636,9 @@ class ExternalModule extends Module {
this.buildMeta.exportsType = "namespace";
canMangle = false;
}
break;
}

break;
}
}
this.addDependency(new StaticExportsDependency(true, canMangle));
Expand Down

0 comments on commit f22a965

Please sign in to comment.