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

@@ -57,14 +57,14 @@ module.exports = class ImportMetaContextDependencyParserPlugin {
apply(parser) {
parser.hooks.evaluateIdentifier
.for("import.meta.webpackContext")
.tap("ImportMetaContextDependencyParserPlugin", expr => {
return evaluateToIdentifier(
.tap("ImportMetaContextDependencyParserPlugin", expr =>
evaluateToIdentifier(
"import.meta.webpackContext",
"import.meta",
() => ["webpackContext"],
true
)(expr);
});
)(expr)
);
parser.hooks.call
.for("import.meta.webpackContext")
.tap("ImportMetaContextDependencyParserPlugin", expr => {
@@ -293,7 +293,7 @@ module.exports = class ImportMetaContextDependencyParserPlugin {
/** @type {Range} */ (expr.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = !!parser.scope.inTry;
dep.optional = Boolean(parser.scope.inTry);
parser.state.current.addDependency(dep);
return true;
});