feat: refactoring project
This commit is contained in:
23
node_modules/webpack/lib/FlagDependencyExportsPlugin.js
generated
vendored
23
node_modules/webpack/lib/FlagDependencyExportsPlugin.js
generated
vendored
@@ -54,14 +54,15 @@ class FlagDependencyExportsPlugin {
|
||||
const exportsInfo = moduleGraph.getExportsInfo(module);
|
||||
// If the module doesn't have an exportsType, it's a module
|
||||
// without declared exports.
|
||||
if (!module.buildMeta || !module.buildMeta.exportsType) {
|
||||
if (exportsInfo.otherExportsInfo.provided !== null) {
|
||||
// It's a module without declared exports
|
||||
statNoExports++;
|
||||
exportsInfo.setHasProvideInfo();
|
||||
exportsInfo.setUnknownExportsProvided();
|
||||
return callback();
|
||||
}
|
||||
if (
|
||||
(!module.buildMeta || !module.buildMeta.exportsType) &&
|
||||
exportsInfo.otherExportsInfo.provided !== null
|
||||
) {
|
||||
// It's a module without declared exports
|
||||
statNoExports++;
|
||||
exportsInfo.setHasProvideInfo();
|
||||
exportsInfo.setUnknownExportsProvided();
|
||||
return callback();
|
||||
}
|
||||
// If the module has no hash, it's uncacheable
|
||||
if (
|
||||
@@ -189,9 +190,9 @@ class FlagDependencyExportsPlugin {
|
||||
let name;
|
||||
let canMangle = globalCanMangle;
|
||||
let terminalBinding = globalTerminalBinding;
|
||||
let exports = undefined;
|
||||
let exports;
|
||||
let from = globalFrom;
|
||||
let fromExport = undefined;
|
||||
let fromExport;
|
||||
let priority = globalPriority;
|
||||
let hidden = false;
|
||||
if (typeof exportNameOrSpec === "string") {
|
||||
@@ -261,7 +262,7 @@ class FlagDependencyExportsPlugin {
|
||||
|
||||
// Recalculate target exportsInfo
|
||||
const target = exportInfo.getTarget(moduleGraph);
|
||||
let targetExportsInfo = undefined;
|
||||
let targetExportsInfo;
|
||||
if (target) {
|
||||
const targetModuleExportsInfo =
|
||||
moduleGraph.getExportsInfo(target.module);
|
||||
|
||||
Reference in New Issue
Block a user