diff --git a/lib/options.json b/lib/options.json index fe1cbce6db..e7dca85dc9 100644 --- a/lib/options.json +++ b/lib/options.json @@ -71,12 +71,14 @@ }, "ClientLogging": { "enum": ["none", "error", "warn", "info", "log", "verbose"], - "decription": "Allows to set log level in the browser." + "decription": "Allows to set log level in the browser.", + "link": "https://webpack.js.org/configuration/dev-server/#logging" }, "ClientOverlay": { "anyOf": [ { "description": "Enables a full-screen overlay in the browser when there are compiler errors or warnings.", + "link": "https://webpack.js.org/configuration/dev-server/#overlay", "type": "boolean" }, { @@ -97,6 +99,7 @@ }, "ClientProgress": { "description": "Prints compilation progress in percentage in the browser.", + "link": "https://webpack.js.org/configuration/dev-server/#progress", "type": "boolean" }, "ClientWebSocketTransport": { @@ -108,7 +111,8 @@ "$ref": "#/definitions/ClientWebSocketTransportString" } ], - "description": "Allows to set custom web socket transport to communicate with dev server." + "description": "Allows to set custom web socket transport to communicate with dev server.", + "link": "https://webpack.js.org/configuration/dev-server/#websockettransport" }, "ClientWebSocketTransportEnum": { "enum": ["sockjs", "ws"] @@ -119,6 +123,7 @@ }, "ClientWebSocketURL": { "description": "Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).", + "link": "https://webpack.js.org/configuration/dev-server/#websocketurl", "anyOf": [ { "type": "string", @@ -514,10 +519,12 @@ "directory": { "type": "string", "minLength": 1, - "description": "Directory for static contents." + "description": "Directory for static contents.", + "link": "https://webpack.js.org/configuration/dev-server/#directory" }, "staticOptions": { "type": "object", + "link": "https://webpack.js.org/configuration/dev-server/#staticoptions", "additionalProperties": true }, "publicPath": { @@ -533,7 +540,8 @@ "type": "string" } ], - "description": "The static files will be available in the browser under this public path." + "description": "The static files will be available in the browser under this public path.", + "link": "https://webpack.js.org/configuration/dev-server/#publicpath" }, "serveIndex": { "anyOf": [ @@ -545,7 +553,8 @@ "additionalProperties": true } ], - "description": "Tells dev server to use serveIndex middleware when enabled." + "description": "Tells dev server to use serveIndex middleware when enabled.", + "link": "https://webpack.js.org/configuration/dev-server/#serveindex" }, "watch": { "anyOf": [ @@ -558,7 +567,8 @@ "link": "https://github.com/paulmillr/chokidar#api" } ], - "description": "Watches for files in static content directory." + "description": "Watches for files in static content directory.", + "link": "https://webpack.js.org/configuration/dev-server/#watch" } } }, diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack4 b/test/__snapshots__/validate-options.test.js.snap.webpack4 index 3954a9a654..5a1b1dd914 100644 --- a/test/__snapshots__/validate-options.test.js.snap.webpack4 +++ b/test/__snapshots__/validate-options.test.js.snap.webpack4 @@ -69,13 +69,15 @@ exports[`options validate should throw an error on the "bonjour" option with '' exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.logging should be one of these: - \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"" + \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\" + -> Read more at https://webpack.js.org/configuration/dev-server/#logging" `; exports[`options validate should throw an error on the "client" option with '{"logging":"whoops!"}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.logging should be one of these: - \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"" + \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\" + -> Read more at https://webpack.js.org/configuration/dev-server/#logging" `; exports[`options validate should throw an error on the "client" option with '{"overlay":""}' value 1`] = ` @@ -90,6 +92,7 @@ exports[`options validate should throw an error on the "client" option with '{"o Details: * options.client.overlay should be a boolean. -> Enables a full-screen overlay in the browser when there are compiler errors or warnings. + -> Read more at https://webpack.js.org/configuration/dev-server/#overlay * options.client.overlay should be an object: object { errors?, warnings? }" `; @@ -115,7 +118,8 @@ exports[`options validate should throw an error on the "client" option with '{"o exports[`options validate should throw an error on the "client" option with '{"progress":""}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.progress should be a boolean. - -> Prints compilation progress in percentage in the browser." + -> Prints compilation progress in percentage in the browser. + -> Read more at https://webpack.js.org/configuration/dev-server/#progress" `; exports[`options validate should throw an error on the "client" option with '{"unknownOption":true}' value 1`] = ` @@ -134,6 +138,7 @@ exports[`options validate should throw an error on the "client" option with '{"w * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string -> Allows to set custom web socket transport to communicate with dev server. + -> Read more at https://webpack.js.org/configuration/dev-server/#websockettransport Details: * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" @@ -554,7 +559,8 @@ exports[`options validate should throw an error on the "static" option with '' v exports[`options validate should throw an error on the "static" option with '{"directory":false}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static.directory should be a non-empty string. - -> Directory for static contents." + -> Directory for static contents. + -> Read more at https://webpack.js.org/configuration/dev-server/#directory" `; exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = ` @@ -567,6 +573,7 @@ exports[`options validate should throw an error on the "static" option with '{"p * options.static.publicPath should be one of these: [string, ...] (should not have fewer than 1 item) | string -> The static files will be available in the browser under this public path. + -> Read more at https://webpack.js.org/configuration/dev-server/#publicpath Details: * options.static.publicPath should be an array: [string, ...] (should not have fewer than 1 item) @@ -583,6 +590,7 @@ exports[`options validate should throw an error on the "static" option with '{"s * options.static.serveIndex should be one of these: boolean | object { … } -> Tells dev server to use serveIndex middleware when enabled. + -> Read more at https://webpack.js.org/configuration/dev-server/#serveindex Details: * options.static.serveIndex should be a boolean. * options.static.serveIndex should be an object: @@ -599,6 +607,7 @@ exports[`options validate should throw an error on the "static" option with '{"w * options.static.watch should be one of these: boolean | object { … } -> Watches for files in static content directory. + -> Read more at https://webpack.js.org/configuration/dev-server/#watch Details: * options.static.watch should be a boolean. * options.static.watch should be an object: diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack5 b/test/__snapshots__/validate-options.test.js.snap.webpack5 index 3954a9a654..5a1b1dd914 100644 --- a/test/__snapshots__/validate-options.test.js.snap.webpack5 +++ b/test/__snapshots__/validate-options.test.js.snap.webpack5 @@ -69,13 +69,15 @@ exports[`options validate should throw an error on the "bonjour" option with '' exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.logging should be one of these: - \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"" + \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\" + -> Read more at https://webpack.js.org/configuration/dev-server/#logging" `; exports[`options validate should throw an error on the "client" option with '{"logging":"whoops!"}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.logging should be one of these: - \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"" + \\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\" + -> Read more at https://webpack.js.org/configuration/dev-server/#logging" `; exports[`options validate should throw an error on the "client" option with '{"overlay":""}' value 1`] = ` @@ -90,6 +92,7 @@ exports[`options validate should throw an error on the "client" option with '{"o Details: * options.client.overlay should be a boolean. -> Enables a full-screen overlay in the browser when there are compiler errors or warnings. + -> Read more at https://webpack.js.org/configuration/dev-server/#overlay * options.client.overlay should be an object: object { errors?, warnings? }" `; @@ -115,7 +118,8 @@ exports[`options validate should throw an error on the "client" option with '{"o exports[`options validate should throw an error on the "client" option with '{"progress":""}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client.progress should be a boolean. - -> Prints compilation progress in percentage in the browser." + -> Prints compilation progress in percentage in the browser. + -> Read more at https://webpack.js.org/configuration/dev-server/#progress" `; exports[`options validate should throw an error on the "client" option with '{"unknownOption":true}' value 1`] = ` @@ -134,6 +138,7 @@ exports[`options validate should throw an error on the "client" option with '{"w * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string -> Allows to set custom web socket transport to communicate with dev server. + -> Read more at https://webpack.js.org/configuration/dev-server/#websockettransport Details: * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" @@ -554,7 +559,8 @@ exports[`options validate should throw an error on the "static" option with '' v exports[`options validate should throw an error on the "static" option with '{"directory":false}' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static.directory should be a non-empty string. - -> Directory for static contents." + -> Directory for static contents. + -> Read more at https://webpack.js.org/configuration/dev-server/#directory" `; exports[`options validate should throw an error on the "static" option with '{"publicPath":false}' value 1`] = ` @@ -567,6 +573,7 @@ exports[`options validate should throw an error on the "static" option with '{"p * options.static.publicPath should be one of these: [string, ...] (should not have fewer than 1 item) | string -> The static files will be available in the browser under this public path. + -> Read more at https://webpack.js.org/configuration/dev-server/#publicpath Details: * options.static.publicPath should be an array: [string, ...] (should not have fewer than 1 item) @@ -583,6 +590,7 @@ exports[`options validate should throw an error on the "static" option with '{"s * options.static.serveIndex should be one of these: boolean | object { … } -> Tells dev server to use serveIndex middleware when enabled. + -> Read more at https://webpack.js.org/configuration/dev-server/#serveindex Details: * options.static.serveIndex should be a boolean. * options.static.serveIndex should be an object: @@ -599,6 +607,7 @@ exports[`options validate should throw an error on the "static" option with '{"w * options.static.watch should be one of these: boolean | object { … } -> Watches for files in static content directory. + -> Read more at https://webpack.js.org/configuration/dev-server/#watch Details: * options.static.watch should be a boolean. * options.static.watch should be an object: