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

@@ -58,9 +58,9 @@ class CssExportDependency extends NullDependency {
*/
getExports(moduleGraph) {
const module = /** @type {CssModule} */ (moduleGraph.getParentModule(this));
const convention = /** @type {CssGenerator | CssExportsGenerator} */ (
module.generator
).convention;
const convention =
/** @type {CssGenerator | CssExportsGenerator} */
(module.generator).convention;
const names = this.getExportsConventionNames(this.name, convention);
return {
exports: names.map(name => ({
@@ -81,14 +81,14 @@ class CssExportDependency extends NullDependency {
const module = /** @type {CssModule} */ (
chunkGraph.moduleGraph.getParentModule(this)
);
const generator = /** @type {CssGenerator | CssExportsGenerator} */ (
module.generator
);
const generator =
/** @type {CssGenerator | CssExportsGenerator} */
(module.generator);
const names = this.getExportsConventionNames(
this.name,
generator.convention
);
hash.update(`exportsConvention`);
hash.update("exportsConvention");
hash.update(JSON.stringify(names));
}
@@ -129,9 +129,9 @@ CssExportDependency.Template = class CssExportDependencyTemplate extends (
) {
const dep = /** @type {CssExportDependency} */ (dependency);
const module = /** @type {CssModule} */ (m);
const convention = /** @type {CssGenerator | CssExportsGenerator} */ (
module.generator
).convention;
const convention =
/** @type {CssGenerator | CssExportsGenerator} */
(module.generator).convention;
const names = dep.getExportsConventionNames(dep.name, convention);
const usedNames = /** @type {string[]} */ (
names