feat: refactoring project
This commit is contained in:
25
node_modules/webpack/lib/library/EnableLibraryPlugin.js
generated
vendored
25
node_modules/webpack/lib/library/EnableLibraryPlugin.js
generated
vendored
@@ -54,8 +54,9 @@ class EnableLibraryPlugin {
|
||||
"EnableLibraryPlugin need to be used to enable this type of library. " +
|
||||
'This usually happens through the "output.enabledLibraryTypes" option. ' +
|
||||
'If you are using a function as entry which sets "library", you need to add all potential library types to "output.enabledLibraryTypes". ' +
|
||||
"These types are enabled: " +
|
||||
Array.from(getEnabledTypes(compiler)).join(", ")
|
||||
`These types are enabled: ${Array.from(
|
||||
getEnabledTypes(compiler)
|
||||
).join(", ")}`
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -84,7 +85,7 @@ class EnableLibraryPlugin {
|
||||
};
|
||||
switch (type) {
|
||||
case "var": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -95,7 +96,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "assign-properties": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -107,7 +108,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "assign": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -118,7 +119,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "this": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -129,7 +130,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "window": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -140,7 +141,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "self": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -151,7 +152,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "global": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -162,7 +163,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "commonjs": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -173,7 +174,7 @@ class EnableLibraryPlugin {
|
||||
break;
|
||||
}
|
||||
case "commonjs-static": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
@@ -185,7 +186,7 @@ class EnableLibraryPlugin {
|
||||
}
|
||||
case "commonjs2":
|
||||
case "commonjs-module": {
|
||||
//@ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
|
||||
const AssignLibraryPlugin = require("./AssignLibraryPlugin");
|
||||
new AssignLibraryPlugin({
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user