Skip to content

Commit

Permalink
feat: support for Rule.resourceFragment (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Nov 18, 2024
1 parent 212c74b commit ae82f17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Rule = Orderable(
'parser',
'generator',
'resource',
'resourceFragment',
'resourceQuery',
'sideEffects',
'test',
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ declare namespace Config {
parser(value: RspackRuleSet['parser']): this;
generator(value: RspackRuleSet['generator']): this;
resource(value: RspackRuleSet['resource']): this;
resourceFragment(value: RspackRuleSet['resourceFragment']): this;
resourceQuery(value: RspackRuleSet['resourceQuery']): this;
sideEffects(value: RspackRuleSet['sideEffects']): this;
test(value: RspackRuleSet['test']): this;
Expand Down
4 changes: 3 additions & 1 deletion types/test/rspack-chain-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ config
.devtoolModuleFilenameTemplate('')
.filename('main.js')
.globalObject('global')
.hashFunction('md5')
.hashFunction('md4')
.hashDigest('md5')
.hashDigestLength(15)
.hashSalt('')
Expand Down Expand Up @@ -129,6 +129,8 @@ config
.post()
.rule('inline')
.after('vue')
.resource(/foo/)
.resourceFragment(/bar/)
.resourceQuery(/inline/)
.use('url')
.loader('url-loader')
Expand Down

0 comments on commit ae82f17

Please sign in to comment.