Skip to content

Commit 1700c33

Browse files
authored
feat: support for Rule.with (#30)
1 parent ae82f17 commit 1700c33

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,9 @@ config.merge({
15431543
mimetype,
15441544
parser,
15451545
resource,
1546+
resourceFragment,
15461547
resourceQuery,
1548+
with,
15471549
test,
15481550

15491551
include: [...paths],

src/Rule.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const Rule = Orderable(
4444
'resourceFragment',
4545
'resourceQuery',
4646
'sideEffects',
47+
'with',
4748
'test',
4849
'type',
4950
]);

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ declare namespace Config {
424424
resourceFragment(value: RspackRuleSet['resourceFragment']): this;
425425
resourceQuery(value: RspackRuleSet['resourceQuery']): this;
426426
sideEffects(value: RspackRuleSet['sideEffects']): this;
427+
with(value: RspackRuleSet['with']): this;
427428
test(value: RspackRuleSet['test']): this;
428429
type(value: RspackRuleSet['type']): this;
429430

types/test/rspack-chain-tests.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ config
107107
.issuerLayer('asd')
108108
.sideEffects(true)
109109
.mimetype('application/json')
110+
.with({
111+
type: 'url'
112+
})
110113
.generator({
111114
asset: {
112115
publicPath: 'assets/',

0 commit comments

Comments
 (0)