feat: refactoring project
This commit is contained in:
28
node_modules/webpack/lib/library/AmdLibraryPlugin.js
generated
vendored
28
node_modules/webpack/lib/library/AmdLibraryPlugin.js
generated
vendored
@@ -60,17 +60,14 @@ class AmdLibraryPlugin extends AbstractLibraryPlugin {
|
||||
`AMD library name must be unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (name && typeof name !== "string") {
|
||||
throw new Error(
|
||||
`AMD library name must be a simple string or unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}`
|
||||
);
|
||||
}
|
||||
} else if (name && typeof name !== "string") {
|
||||
throw new Error(
|
||||
`AMD library name must be a simple string or unset. ${AbstractLibraryPlugin.COMMON_LIBRARY_NAME_MESSAGE}`
|
||||
);
|
||||
}
|
||||
return {
|
||||
name: /** @type {string} */ (name),
|
||||
amdContainer: /** @type {string} */ (amdContainer)
|
||||
};
|
||||
const _name = /** @type {string} */ (name);
|
||||
const _amdContainer = /** @type {string} */ (amdContainer);
|
||||
return { name: _name, amdContainer: _amdContainer };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,13 +143,12 @@ class AmdLibraryPlugin extends AbstractLibraryPlugin {
|
||||
source,
|
||||
`${fnEnd});`
|
||||
);
|
||||
} else {
|
||||
return new ConcatSource(
|
||||
`${amdContainerPrefix}define(${fnStart}`,
|
||||
source,
|
||||
`${fnEnd});`
|
||||
);
|
||||
}
|
||||
return new ConcatSource(
|
||||
`${amdContainerPrefix}define(${fnStart}`,
|
||||
source,
|
||||
`${fnEnd});`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user