feat: refactoring project
This commit is contained in:
5
node_modules/webpack/lib/rules/ObjectMatcherRulePlugin.js
generated
vendored
5
node_modules/webpack/lib/rules/ObjectMatcherRulePlugin.js
generated
vendored
@@ -5,6 +5,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
/** @typedef {import("../../declarations/WebpackOptions").RuleSetRule} RuleSetRule */
|
||||
/** @typedef {import("./RuleSetCompiler")} RuleSetCompiler */
|
||||
/** @typedef {import("./RuleSetCompiler").RuleCondition} RuleCondition */
|
||||
/** @typedef {import("./RuleSetCompiler").RuleConditionFunction} RuleConditionFunction */
|
||||
@@ -32,7 +33,9 @@ class ObjectMatcherRulePlugin {
|
||||
(path, rule, unhandledProperties, result) => {
|
||||
if (unhandledProperties.has(ruleProperty)) {
|
||||
unhandledProperties.delete(ruleProperty);
|
||||
const value = rule[ruleProperty];
|
||||
const value =
|
||||
/** @type {Record<string, any>} */
|
||||
(rule[/** @type {keyof RuleSetRule} */ (ruleProperty)]);
|
||||
for (const property of Object.keys(value)) {
|
||||
const nestedDataProperties = property.split(".");
|
||||
const condition = ruleSetCompiler.compileCondition(
|
||||
|
||||
Reference in New Issue
Block a user