Skip to content

Commit

Permalink
feat: support for Rule.with (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Nov 18, 2024
1 parent ae82f17 commit 1700c33
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,9 @@ config.merge({
mimetype,
parser,
resource,
resourceFragment,
resourceQuery,
with,
test,

include: [...paths],
Expand Down
1 change: 1 addition & 0 deletions src/Rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const Rule = Orderable(
'resourceFragment',
'resourceQuery',
'sideEffects',
'with',
'test',
'type',
]);
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ declare namespace Config {
resourceFragment(value: RspackRuleSet['resourceFragment']): this;
resourceQuery(value: RspackRuleSet['resourceQuery']): this;
sideEffects(value: RspackRuleSet['sideEffects']): this;
with(value: RspackRuleSet['with']): this;
test(value: RspackRuleSet['test']): this;
type(value: RspackRuleSet['type']): this;

Expand Down
3 changes: 3 additions & 0 deletions types/test/rspack-chain-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ config
.issuerLayer('asd')
.sideEffects(true)
.mimetype('application/json')
.with({
type: 'url'
})
.generator({
asset: {
publicPath: 'assets/',
Expand Down

0 comments on commit 1700c33

Please sign in to comment.