Skip to content

Commit 2a6ba9c

Browse files
committed
apply absolutePath to webpack schema
1 parent 254b603 commit 2a6ba9c

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎lib/validateSchema.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const ajv = new Ajv({
1111
verbose: true
1212
});
1313
require("ajv-keywords")(ajv, ["instanceof"]);
14+
require("../schemas/ajv.absolutePath")(ajv);
1415

1516
function validateSchema(schema, options) {
1617
if(Array.isArray(options)) {

‎schemas/webpackOptionsSchema.json‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@
302302
},
303303
"filename": {
304304
"description": "Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.",
305-
"type": "string"
305+
"type": "string",
306+
"absolutePath": false
306307
},
307308
"hashDigest": {
308309
"minLength": 1,
@@ -364,7 +365,8 @@
364365
},
365366
"path": {
366367
"description": "The output directory as **absolute path** (required).",
367-
"type": "string"
368+
"type": "string",
369+
"absolutePath": true
368370
},
369371
"pathinfo": {
370372
"description": "Include comments with information about the modules.",
@@ -673,7 +675,8 @@
673675
},
674676
"context": {
675677
"description": "The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.",
676-
"type": "string"
678+
"type": "string",
679+
"absolutePath": true
677680
},
678681
"dependencies": {
679682
"description": "References to other configurations to depend on.",
@@ -824,7 +827,8 @@
824827
},
825828
"recordsPath": {
826829
"description": "Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.",
827-
"type": "string"
830+
"type": "string",
831+
"absolutePath": true
828832
},
829833
"resolve": {
830834
"$ref": "#/definitions/resolve"

0 commit comments

Comments
 (0)