diff --git a/declarations/WebpackOptions.d.ts b/declarations/WebpackOptions.d.ts index d265893d69d..78dd6586ae7 100644 --- a/declarations/WebpackOptions.d.ts +++ b/declarations/WebpackOptions.d.ts @@ -1180,6 +1180,10 @@ export interface ResolveOptions { resolver?: { [k: string]: any; }; + /** + * A list of resolve restrictions. + */ + restrictions?: (RegExp | string)[]; /** * Enable resolving symlinks to the original location. */ diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 662c4eba7f0..cebf1eff3c9 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -2235,6 +2235,22 @@ "resolver": { "description": "Custom resolver." }, + "restrictions": { + "description": "A list of resolve restrictions.", + "type": "array", + "items": { + "description": "Resolve restriction.", + "oneOf": [ + { + "instanceof": "RegExp", + "tsType": "RegExp" + }, + { + "type": "string" + } + ] + } + }, "symlinks": { "description": "Enable resolving symlinks to the original location.", "type": "boolean" diff --git a/types.d.ts b/types.d.ts index 708b7e80436..a0a6e331f87 100644 --- a/types.d.ts +++ b/types.d.ts @@ -5811,6 +5811,11 @@ declare interface ResolveOptions { */ resolver?: { [index: string]: any }; + /** + * A list of resolve restrictions. + */ + restrictions?: (string | RegExp)[]; + /** * Enable resolving symlinks to the original location. */