Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
hai-x committed Dec 22, 2024
1 parent cad432f commit cb61f2f
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions packages/rspack/src/config/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,19 @@ const getRawModuleRule = (
: undefined,
descriptionData: rule.descriptionData
? Object.fromEntries(
Object.entries(rule.descriptionData).map(([k, v]) => [
k,
getRawRuleSetCondition(v)
])
)
Object.entries(rule.descriptionData).map(([k, v]) => [
k,
getRawRuleSetCondition(v)
])
)
: undefined,
with: rule.with
? Object.fromEntries(
Object.entries(rule.with).map(([k, v]) => [
k,
getRawRuleSetCondition(v)
])
)
Object.entries(rule.with).map(([k, v]) => [
k,
getRawRuleSetCondition(v)
])
)
: undefined,
resource: rule.resource ? getRawRuleSetCondition(rule.resource) : undefined,
resourceQuery: rule.resourceQuery
Expand All @@ -302,27 +302,27 @@ const getRawModuleRule = (
resolve: rule.resolve ? getRawResolve(rule.resolve) : undefined,
oneOf: rule.oneOf
? rule.oneOf
.filter(Boolean)
.map((rule, index) =>
getRawModuleRule(
rule as RuleSetRule,
`${path}.oneOf[${index}]`,
options,
(rule as RuleSetRule).type ?? upperType
.filter(Boolean)
.map((rule, index) =>
getRawModuleRule(
rule as RuleSetRule,
`${path}.oneOf[${index}]`,
options,
(rule as RuleSetRule).type ?? upperType
)
)
)
: undefined,
rules: rule.rules
? rule.rules
.filter(Boolean)
.map((rule, index) =>
getRawModuleRule(
rule as RuleSetRule,
`${path}.rules[${index}]`,
options,
(rule as RuleSetRule).type ?? upperType
.filter(Boolean)
.map((rule, index) =>
getRawModuleRule(
rule as RuleSetRule,
`${path}.rules[${index}]`,
options,
(rule as RuleSetRule).type ?? upperType
)
)
)
: undefined,
enforce: rule.enforce
};
Expand Down

0 comments on commit cb61f2f

Please sign in to comment.