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

44
node_modules/webpack/lib/index.js generated vendored
View File

@@ -71,9 +71,11 @@ const memoize = require("./util/memoize");
const lazyFunction = factory => {
const fac = memoize(factory);
const f = /** @type {any} */ (
(...args) => {
return fac()(...args);
}
/**
* @param {...any} args args
* @returns {T} result
*/
(...args) => fac()(...args)
);
return /** @type {T} */ (f);
};
@@ -117,15 +119,24 @@ module.exports = mergeExports(fn, {
get webpack() {
return require("./webpack");
},
/**
* @returns {function(Configuration | Configuration[]): void} validate fn
*/
get validate() {
const webpackOptionsSchemaCheck = require("../schemas/WebpackOptions.check.js");
const getRealValidate = memoize(() => {
const validateSchema = require("./validateSchema");
const webpackOptionsSchema = require("../schemas/WebpackOptions.json");
return options => validateSchema(webpackOptionsSchema, options);
});
const getRealValidate = memoize(
/**
* @returns {function(Configuration | Configuration[]): void} validate fn
*/
() => {
const validateSchema = require("./validateSchema");
const webpackOptionsSchema = require("../schemas/WebpackOptions.json");
return options => validateSchema(webpackOptionsSchema, options);
}
);
return options => {
if (!webpackOptionsSchemaCheck(options)) getRealValidate()(options);
if (!webpackOptionsSchemaCheck(/** @type {TODO} */ (options)))
getRealValidate()(options);
};
},
get validateSchema() {
@@ -479,6 +490,15 @@ module.exports = mergeExports(fn, {
},
get JsonpTemplatePlugin() {
return require("./web/JsonpTemplatePlugin");
},
get CssLoadingRuntimeModule() {
return require("./css/CssLoadingRuntimeModule");
}
},
esm: {
get ModuleChunkLoadingRuntimeModule() {
return require("./esm/ModuleChunkLoadingRuntimeModule");
}
},
@@ -521,6 +541,12 @@ module.exports = mergeExports(fn, {
}
},
css: {
get CssModulesPlugin() {
return require("./css/CssModulesPlugin");
}
},
library: {
get AbstractLibraryPlugin() {
return require("./library/AbstractLibraryPlugin");