Skip to content

Commit 1860e6c

Browse files
committed
fix: ad more links
1 parent 2a822f2 commit 1860e6c

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

lib/options.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,12 @@
519519
"directory": {
520520
"type": "string",
521521
"minLength": 1,
522-
"description": "Directory for static contents."
522+
"description": "Directory for static contents.",
523+
"link": "https://webpack.js.org/configuration/dev-server/#directory"
523524
},
524525
"staticOptions": {
525526
"type": "object",
527+
"link": "https://webpack.js.org/configuration/dev-server/#staticoptions",
526528
"additionalProperties": true
527529
},
528530
"publicPath": {
@@ -538,7 +540,8 @@
538540
"type": "string"
539541
}
540542
],
541-
"description": "The static files will be available in the browser under this public path."
543+
"description": "The static files will be available in the browser under this public path.",
544+
"link": "https://webpack.js.org/configuration/dev-server/#publicpath"
542545
},
543546
"serveIndex": {
544547
"anyOf": [
@@ -550,7 +553,8 @@
550553
"additionalProperties": true
551554
}
552555
],
553-
"description": "Tells dev server to use serveIndex middleware when enabled."
556+
"description": "Tells dev server to use serveIndex middleware when enabled.",
557+
"link": "https://webpack.js.org/configuration/dev-server/#serveindex"
554558
},
555559
"watch": {
556560
"anyOf": [
@@ -563,7 +567,8 @@
563567
"link": "https://github.com/paulmillr/chokidar#api"
564568
}
565569
],
566-
"description": "Watches for files in static content directory."
570+
"description": "Watches for files in static content directory.",
571+
"link": "https://webpack.js.org/configuration/dev-server/#watch"
567572
}
568573
}
569574
},

test/__snapshots__/validate-options.test.js.snap.webpack5

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ exports[`options validate should throw an error on the "static" option with '' v
559559
exports[`options validate should throw an error on the "static" option with '{"directory":false}' value 1`] = `
560560
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
561561
- options.static.directory should be a non-empty string.
562-
-> Directory for static contents."
562+
-> Directory for static contents.
563+
-> Read more at https://webpack.js.org/configuration/dev-server/#directory"
563564
`;
564565

565566
exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = `
@@ -572,6 +573,7 @@ exports[`options validate should throw an error on the "static" option with '{"p
572573
* options.static.publicPath should be one of these:
573574
[string, ...] (should not have fewer than 1 item) | string
574575
-> The static files will be available in the browser under this public path.
576+
-> Read more at https://webpack.js.org/configuration/dev-server/#publicpath
575577
Details:
576578
* options.static.publicPath should be an array:
577579
[string, ...] (should not have fewer than 1 item)
@@ -588,6 +590,7 @@ exports[`options validate should throw an error on the "static" option with '{"s
588590
* options.static.serveIndex should be one of these:
589591
boolean | object { … }
590592
-> Tells dev server to use serveIndex middleware when enabled.
593+
-> Read more at https://webpack.js.org/configuration/dev-server/#serveindex
591594
Details:
592595
* options.static.serveIndex should be a boolean.
593596
* options.static.serveIndex should be an object:
@@ -604,6 +607,7 @@ exports[`options validate should throw an error on the "static" option with '{"w
604607
* options.static.watch should be one of these:
605608
boolean | object { … }
606609
-> Watches for files in static content directory.
610+
-> Read more at https://webpack.js.org/configuration/dev-server/#watch
607611
Details:
608612
* options.static.watch should be a boolean.
609613
* options.static.watch should be an object:

0 commit comments

Comments
 (0)