Skip to content

Commit

Permalink
Merge pull request #9326 from vankop/add-real-resource-parameter
Browse files Browse the repository at this point in the history
add realResource parameter to RuleSetRule
  • Loading branch information
sokra committed Jun 30, 2019
2 parents c8f4dd1 + 68f794d commit 5523a0a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions declarations/WebpackOptions.d.ts
Expand Up @@ -558,6 +558,10 @@ export interface RuleSetRule {
* Shortcut for use.query
*/
query?: RuleSetQuery;
/**
* Match rules with custom resource name
*/
realResource?: RuleSetConditionOrConditions;
/**
* Options for the resolver
*/
Expand Down
8 changes: 8 additions & 0 deletions schemas/WebpackOptions.json
Expand Up @@ -1521,6 +1521,14 @@
}
]
},
"realResource": {
"description": "Match rules with custom resource name",
"anyOf": [
{
"$ref": "#/definitions/RuleSetConditionOrConditions"
}
]
},
"resolve": {
"description": "Options for the resolver",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion test/Validation.test.js
Expand Up @@ -178,7 +178,7 @@ describe("Validation", () => {
expect(msg).toMatchInlineSnapshot(`
"Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[0].oneOf[0] has an unknown property 'passer'. These properties are valid:
object { compiler?, enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, resolve?, resource?, resourceQuery?, rules?, sideEffects?, test?, type?, use? }
object { compiler?, enforce?, exclude?, include?, issuer?, loader?, loaders?, oneOf?, options?, parser?, query?, realResource?, resolve?, resource?, resourceQuery?, rules?, sideEffects?, test?, type?, use? }
-> A rule"
`)
);
Expand Down

0 comments on commit 5523a0a

Please sign in to comment.