feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -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,