diff --git a/README.md b/README.md index e97c9986b5..8e75cacbae 100644 --- a/README.md +++ b/README.md @@ -85,12 +85,14 @@ Options: --no-target Negative 'target' option. --watch-options-stdin Stop watching when stdin stream has ended. --no-watch-options-stdin Do not stop watching when stdin stream has ended. - --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour + --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying + dev server, by default is 'auto'). + --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to + the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --bonjour Allows to broadcasts dev server via ZeroConf networking on start. --no-bonjour Negative 'bonjour' option. --no-client Negative 'client' option. - --client-logging Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + --client-logging Allows to specify options for client script in the browser or disable client script. --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. --no-client-overlay Negative 'client-overlay' option. --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. @@ -100,23 +102,25 @@ Options: --client-progress Prints compilation progress in percentage in the browser. --no-client-progress Negative 'client-progress' option. --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url 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). + --client-web-socket-url 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). --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. --client-web-socket-url-port Tells clients connected to devServer to use the provided port. --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress + --compress Enables gzip compression for everything served. --no-compress Negative 'compress' option. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback + --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page + Applications that utilise the HTML5 History API. --no-history-api-fallback Negative 'history-api-fallback' option. - --host Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost - --hot [value] Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + --host Allows to specify a hostname to use. + --hot [value] Enables Hot Module Replacement. --no-hot Negative 'hot' option. - --http2 Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2 + --http2 Allows to serve over HTTP/2 using SPDY. --no-http2 Negative 'http2' option. - --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Negative 'https' option. --https-passphrase Passphrase for a pfx file. --https-request-cert Request for an SSL certificate. @@ -125,19 +129,21 @@ Options: --https-key Path to an SSL key. --https-pfx Path to an SSL pfx file. --https-cert Path to an SSL certificate. - --ipc [value] Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload + --ipc [value] Listen to a unix socket. + --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Negative 'live-reload' option. - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to + true to open your default browser). --no-open Negative 'open' option. --open-target Opens specified page in browser. --open-app-name Open specified browser. --open-app Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and + page(s) after server had been started (set it to true to open your default browser). --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + --port Allows to specify a port to use. + --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). --no-static Negative 'static' option. --static-directory Directory for static contents. --static-public-path The static files will be available in the browser under this public path. @@ -145,11 +151,14 @@ Options: --no-static-serve-index Negative 'static-serve-index' option. --static-watch Watches for files in static content directory. --no-static-watch Negative 'static-watch' option. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles - --web-socket-server Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files + from directory (by default 'public' directory). + --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the + browser under this public path. + --watch-files Allows to configure list of globs/directories/files to watch for file changes. + --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files + to watch for file changes. + --web-socket-server Allows to set web socket server and options (by default 'ws'). Global options: --color Enable colors on console. diff --git a/bin/cli-flags.js b/bin/cli-flags.js index 3030c800f9..b91f9a9eff 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -7,12 +7,12 @@ module.exports = { type: 'string', multiple: true, description: - "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts", + "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", path: 'allowedHosts[]', }, { description: - "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts", + "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", multiple: false, path: 'allowedHosts', type: 'enum', @@ -20,7 +20,7 @@ module.exports = { }, ], description: - "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts", + "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", multiple: true, simpleType: 'string', }, @@ -30,12 +30,12 @@ module.exports = { type: 'reset', multiple: false, description: - "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts", + "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", path: 'allowedHosts', }, ], description: - "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts", + "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", simpleType: 'boolean', multiple: false, }, @@ -45,14 +45,14 @@ module.exports = { type: 'boolean', multiple: false, description: - 'Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour', + 'Allows to broadcasts dev server via ZeroConf networking on start.', path: 'bonjour', }, ], description: - 'Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour', + 'Allows to broadcasts dev server via ZeroConf networking on start.', negatedDescription: - 'Disallows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour', + 'Disallows to broadcasts dev server via ZeroConf networking on start.', simpleType: 'boolean', multiple: false, }, @@ -83,7 +83,7 @@ module.exports = { configs: [ { description: - 'Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient', + 'Allows to specify options for client script in the browser or disable client script.', multiple: false, path: 'client', type: 'enum', @@ -91,7 +91,7 @@ module.exports = { }, ], description: - 'Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient', + 'Allows to specify options for client script in the browser or disable client script.', multiple: false, simpleType: 'boolean', }, @@ -102,12 +102,12 @@ module.exports = { values: ['none', 'error', 'warn', 'info', 'log', 'verbose'], multiple: false, description: - 'Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient', + 'Allows to specify options for client script in the browser or disable client script.', path: 'client.logging', }, ], description: - 'Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient', + 'Allows to specify options for client script in the browser or disable client script.', simpleType: 'string', multiple: false, }, @@ -301,19 +301,19 @@ module.exports = { values: ['sockjs', 'ws'], multiple: false, description: - "Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver", + "Allows to set web socket server and options (by default 'ws').", path: 'webSocketServer', }, { type: 'string', multiple: false, description: - "Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver", + "Allows to set web socket server and options (by default 'ws').", path: 'webSocketServer', }, ], description: - "Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver", + "Allows to set web socket server and options (by default 'ws').", simpleType: 'string', multiple: false, }, @@ -322,13 +322,11 @@ module.exports = { { type: 'boolean', multiple: false, - description: - 'Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress', + description: 'Enables gzip compression for everything served.', path: 'compress', }, ], - description: - 'Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress', + description: 'Enables gzip compression for everything served.', negatedDescription: 'Disables gzip compression for everything served.', simpleType: 'boolean', multiple: false, @@ -339,12 +337,12 @@ module.exports = { type: 'boolean', multiple: false, description: - "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback", + "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.", path: 'historyApiFallback', }, ], description: - "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback", + "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.", simpleType: 'boolean', multiple: false, }, @@ -353,13 +351,11 @@ module.exports = { { type: 'string', multiple: false, - description: - 'Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost', + description: 'Allows to specify a hostname to use.', path: 'host', }, ], - description: - 'Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost', + description: 'Allows to specify a hostname to use.', simpleType: 'string', multiple: false, }, @@ -368,21 +364,18 @@ module.exports = { { type: 'boolean', multiple: false, - description: - 'Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot', + description: 'Enables Hot Module Replacement.', path: 'hot', }, { type: 'enum', values: ['only'], multiple: false, - description: - 'Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot', + description: 'Enables Hot Module Replacement.', path: 'hot', }, ], - description: - 'Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot', + description: 'Enables Hot Module Replacement.', negatedDescription: 'Disables Hot Module Replacement.', simpleType: 'string', multiple: false, @@ -392,13 +385,11 @@ module.exports = { { type: 'boolean', multiple: false, - description: - 'Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2', + description: 'Allows to serve over HTTP/2 using SPDY.', path: 'http2', }, ], - description: - 'Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2', + description: 'Allows to serve over HTTP/2 using SPDY.', negatedDescription: 'Does not serve over HTTP/2 using SPDY.', simpleType: 'boolean', multiple: false, @@ -409,12 +400,12 @@ module.exports = { type: 'boolean', multiple: false, description: - "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps", + "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", path: 'https', }, ], description: - "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps", + "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", negatedDescription: "Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", simpleType: 'boolean', @@ -504,21 +495,18 @@ module.exports = { { type: 'string', multiple: false, - description: - 'Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc', + description: 'Listen to a unix socket.', path: 'ipc', }, { type: 'enum', values: [true], multiple: false, - description: - 'Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc', + description: 'Listen to a unix socket.', path: 'ipc', }, ], - description: - 'Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc', + description: 'Listen to a unix socket.', simpleType: 'string', multiple: false, }, @@ -528,12 +516,12 @@ module.exports = { type: 'boolean', multiple: false, description: - 'Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload', + 'Enables reload/refresh the page(s) when file changes are detected (enabled by default).', path: 'liveReload', }, ], description: - 'Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload', + 'Enables reload/refresh the page(s) when file changes are detected (enabled by default).', negatedDescription: 'Disables reload/refresh the page(s) when file changes are detected (enabled by default)', simpleType: 'boolean', @@ -545,19 +533,19 @@ module.exports = { type: 'string', multiple: true, description: - 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen', + 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).', path: 'open[]', }, { type: 'boolean', multiple: false, description: - 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen', + 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).', path: 'open', }, ], description: - 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen', + 'Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).', negatedDescription: 'Does not open the default browser.', simpleType: 'string', multiple: true, @@ -620,12 +608,12 @@ module.exports = { type: 'reset', multiple: false, description: - "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen", + "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).", path: 'open', }, ], description: - "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen", + "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).", simpleType: 'boolean', multiple: false, }, @@ -664,28 +652,24 @@ module.exports = { { type: 'number', multiple: false, - description: - 'Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport', + description: 'Allows to specify a port to use.', path: 'port', }, { type: 'string', multiple: false, - description: - 'Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport', + description: 'Allows to specify a port to use.', path: 'port', }, { type: 'enum', values: ['auto'], multiple: false, - description: - 'Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport', + description: 'Allows to specify a port to use.', path: 'port', }, ], - description: - 'Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport', + description: 'Allows to specify a port to use.', simpleType: 'string', multiple: false, }, @@ -695,19 +679,19 @@ module.exports = { type: 'string', multiple: true, description: - "Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic", + "Allows to configure options for serving static files from directory (by default 'public' directory).", path: 'static[]', }, { type: 'boolean', multiple: false, description: - "Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic", + "Allows to configure options for serving static files from directory (by default 'public' directory).", path: 'static', }, ], description: - "Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic", + "Allows to configure options for serving static files from directory (by default 'public' directory).", simpleType: 'string', multiple: true, }, @@ -782,12 +766,12 @@ module.exports = { type: 'reset', multiple: false, description: - "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic", + "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).", path: 'static', }, ], description: - "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic", + "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).", simpleType: 'boolean', multiple: false, }, @@ -812,12 +796,12 @@ module.exports = { type: 'string', multiple: true, description: - 'Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles', + 'Allows to configure list of globs/directories/files to watch for file changes.', path: 'watchFiles[]', }, ], description: - 'Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles', + 'Allows to configure list of globs/directories/files to watch for file changes.', simpleType: 'string', multiple: true, }, @@ -827,12 +811,12 @@ module.exports = { type: 'reset', multiple: false, description: - "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles", + "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.", path: 'watchFiles', }, ], description: - "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles", + "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.", simpleType: 'boolean', multiple: false, }, diff --git a/lib/options.json b/lib/options.json index ad44eb8f66..7111f153eb 100644 --- a/lib/options.json +++ b/lib/options.json @@ -18,7 +18,8 @@ "$ref": "#/definitions/AllowedHostsItem" } ], - "description": "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts" + "description": "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').", + "link": "https://webpack.js.org/configuration/dev-server/#devserverallowedhosts" }, "AllowedHostsItem": { "type": "string", @@ -31,13 +32,16 @@ }, { "type": "object", - "description": "Options for bonjour, description available at https://github.com/watson/bonjour#initializing" + "description": "Options for bonjour.", + "link": "https://github.com/watson/bonjour#initializing" } ], - "description": "Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour" + "description": "Allows to broadcasts dev server via ZeroConf networking on start.", + "link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour" }, "Client": { - "description": "Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient", + "description": "Allows to specify options for client script in the browser or disable client script.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverclient", "anyOf": [ { "enum": [false] @@ -171,16 +175,19 @@ }, "Compress": { "type": "boolean", - "description": "Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress" + "description": "Enables gzip compression for everything served.", + "link": "https://webpack.js.org/configuration/dev-server/#devservercompress" }, "DevMiddleware": { - "description": "Provide options to 'webpack-dev-middleware' which handles webpack assets. https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware", + "description": "Provide options to 'webpack-dev-middleware' which handles webpack assets.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware", "type": "object", "additionalProperties": true }, "HTTP2": { "type": "boolean", - "description": "Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2" + "description": "Allows to serve over HTTP/2 using SPDY.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2" }, "HTTPS": { "anyOf": [ @@ -246,7 +253,8 @@ } } ], - "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps" + "description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhttps" }, "Headers": { "anyOf": [ @@ -257,7 +265,8 @@ "instanceof": "Function" } ], - "description": "Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders" + "description": "Allows to set custom headers on response.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverheaders" }, "HistoryApiFallback": { "anyOf": [ @@ -266,15 +275,18 @@ }, { "type": "object", - "description": "Options for `historyApiFallback`, description available at https://github.com/bripkens/connect-history-api-fallback#options" + "description": "Options for `historyApiFallback`.", + "link": "https://github.com/bripkens/connect-history-api-fallback#options" } ], - "description": "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback" + "description": "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback" }, "Host": { "type": "string", "minLength": 1, - "description": "Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + "description": "Allows to specify a hostname to use.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhost" }, "Hot": { "anyOf": [ @@ -285,7 +297,8 @@ "enum": ["only"] } ], - "description": "Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot" + "description": "Enables Hot Module Replacement.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverhot" }, "IPC": { "anyOf": [ @@ -298,23 +311,28 @@ "enum": [true] } ], - "description": "Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc" + "description": "Listen to a unix socket.", + "link": "https://webpack.js.org/configuration/dev-server/#devserveripc" }, "LiveReload": { "type": "boolean", - "description": "Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload" + "description": "Enables reload/refresh the page(s) when file changes are detected (enabled by default).", + "link": "https://webpack.js.org/configuration/dev-server/#devserverlivereload" }, "OnAfterSetupMiddleware": { "instanceof": "Function", - "description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" + "description": "Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares.", + "link": "https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" }, "OnBeforeSetupMiddleware": { "instanceof": "Function", - "description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" + "description": "Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares.", + "link": "https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" }, "OnListening": { "instanceof": "Function", - "description": "Provides the ability to execute a custom function when dev server starts listening. https://webpack.js.org/configuration/dev-server/#devserveronlistening" + "description": "Provides the ability to execute a custom function when dev server starts listening.", + "link": "https://webpack.js.org/configuration/dev-server/#devserveronlistening" }, "Open": { "anyOf": [ @@ -341,7 +359,8 @@ "$ref": "#/definitions/OpenObject" } ], - "description": "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen" + "description": "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).", + "link": "https://webpack.js.org/configuration/dev-server/#devserveropen" }, "OpenBoolean": { "type": "boolean" @@ -420,7 +439,8 @@ "enum": ["auto"] } ], - "description": "Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport" + "description": "Allows to specify a port to use.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverport" }, "Proxy": { "anyOf": [ @@ -441,11 +461,13 @@ } } ], - "description": "Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy" + "description": "Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverproxy" }, "SetupExitSignals": { "type": "boolean", - "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI). https://webpack.js.org/configuration/dev-server/#devserversetupexitsignals", + "description": "Allows to close dev server and exit the process on SIGINT and SIGTERM signals (enabled by default for CLI).", + "link": "https://webpack.js.org/configuration/dev-server/#devserversetupexitsignals", "cli": { "exclude": true } @@ -475,7 +497,8 @@ "$ref": "#/definitions/StaticObject" } ], - "description": "Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic" + "description": "Allows to configure options for serving static files from directory (by default 'public' directory).", + "link": "https://webpack.js.org/configuration/dev-server/#devserverstatic" }, "StaticObject": { "type": "object", @@ -524,7 +547,8 @@ }, { "type": "object", - "description": "Options for watch, description available at https://github.com/paulmillr/chokidar#api" + "description": "Options for watch.", + "link": "https://github.com/paulmillr/chokidar#api" } ], "description": "Watches for files in static content directory." @@ -557,7 +581,8 @@ "$ref": "#/definitions/WatchFilesObject" } ], - "description": "Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles" + "description": "Allows to configure list of globs/directories/files to watch for file changes.", + "link": "https://webpack.js.org/configuration/dev-server/#devserverwatchfiles" }, "WatchFilesObject": { "cli": { @@ -606,7 +631,8 @@ "$ref": "#/definitions/WebSocketServerObject" } ], - "description": "Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver" + "description": "Allows to set web socket server and options (by default 'ws').", + "link": "https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver" }, "WebSocketServerEnum": { "enum": ["sockjs", "ws"] diff --git a/package-lock.json b/package-lock.json index 935ac7f6fd..efea3ed6dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "open": "^8.0.9", "p-retry": "^4.5.0", "portfinder": "^1.0.28", - "schema-utils": "^3.0.0", + "schema-utils": "^3.1.0", "selfsigned": "^1.10.11", "serve-index": "^1.9.1", "sockjs": "^0.3.21", @@ -81,7 +81,7 @@ "tcp-port-used": "^1.0.2", "typescript": "^4.2.4", "url-loader": "^4.1.1", - "webpack": "^5.41.0", + "webpack": "^5.44.0", "webpack-cli": "^4.7.2", "webpack-merge": "^5.8.0" }, diff --git a/package.json b/package.json index bad8e90cc1..36614f601c 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "open": "^8.0.9", "p-retry": "^4.5.0", "portfinder": "^1.0.28", - "schema-utils": "^3.0.0", + "schema-utils": "^3.1.0", "selfsigned": "^1.10.11", "serve-index": "^1.9.1", "sockjs": "^0.3.21", @@ -101,7 +101,7 @@ "tcp-port-used": "^1.0.2", "typescript": "^4.2.4", "url-loader": "^4.1.1", - "webpack": "^5.41.0", + "webpack": "^5.44.0", "webpack-cli": "^4.7.2", "webpack-merge": "^5.8.0" }, diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack4 b/test/__snapshots__/validate-options.test.js.snap.webpack4 index 28958a3de6..5b3294c6ea 100644 --- a/test/__snapshots__/validate-options.test.js.snap.webpack4 +++ b/test/__snapshots__/validate-options.test.js.snap.webpack4 @@ -14,7 +14,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -27,7 +28,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -40,7 +42,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -53,12 +56,14 @@ exports[`options validate should throw an error on the "bonjour" option with '' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.bonjour should be one of these: boolean | object { … } - -> Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour + -> Allows to broadcasts dev server via ZeroConf networking on start. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverbonjour Details: * options.bonjour should be a boolean. * options.bonjour should be an object: object { … } - -> Options for bonjour, description available at https://github.com/watson/bonjour#initializing" + -> Options for bonjour. + -> Read more at https://github.com/watson/bonjour#initializing" `; exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = ` @@ -77,7 +82,8 @@ exports[`options validate should throw an error on the "client" option with '{"o "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.overlay should be one of these: boolean | object { errors?, warnings? } @@ -122,7 +128,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string @@ -160,7 +167,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketURL.port should be one of these: number | non-empty string @@ -174,7 +182,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketURL.password should be a string. -> Tells clients connected to devServer to use the provided password to authenticate. @@ -186,7 +195,8 @@ exports[`options validate should throw an error on the "client" option with 'who "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client should be false. * options.client should be an object: @@ -196,21 +206,24 @@ exports[`options validate should throw an error on the "client" option with 'who exports[`options validate should throw an error on the "compress" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.compress should be a boolean. - -> Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress" + -> Enables gzip compression for everything served. + -> Read more at https://webpack.js.org/configuration/dev-server/#devservercompress" `; exports[`options validate should throw an error on the "devMiddleware" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.devMiddleware should be an object: object { … } - -> Provide options to 'webpack-dev-middleware' which handles webpack assets. https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware" + -> Provide options to 'webpack-dev-middleware' which handles webpack assets. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware" `; exports[`options validate should throw an error on the "headers" option with '1' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.headers should be one of these: object { … } | function - -> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders + -> Allows to set custom headers on response. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders Details: * options.headers should be an object: object { … } @@ -221,7 +234,8 @@ exports[`options validate should throw an error on the "headers" option with 'fa "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.headers should be one of these: object { … } | function - -> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders + -> Allows to set custom headers on response. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders Details: * options.headers should be an object: object { … } @@ -232,37 +246,43 @@ exports[`options validate should throw an error on the "historyApiFallback" opti "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.historyApiFallback should be one of these: boolean | object { … } - -> Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback + -> Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback Details: * options.historyApiFallback should be a boolean. * options.historyApiFallback should be an object: object { … } - -> Options for \`historyApiFallback\`, description available at https://github.com/bripkens/connect-history-api-fallback#options" + -> Options for \`historyApiFallback\`. + -> Read more at https://github.com/bripkens/connect-history-api-fallback#options" `; exports[`options validate should throw an error on the "host" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "host" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "host" option with 'null' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "hot" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.hot should be one of these: boolean | \\"only\\" - -> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + -> Enables Hot Module Replacement. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhot Details: * options.hot should be a boolean. * options.hot should be \\"only\\"." @@ -272,7 +292,8 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.hot should be one of these: boolean | \\"only\\" - -> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + -> Enables Hot Module Replacement. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhot Details: * options.hot should be a boolean. * options.hot should be \\"only\\"." @@ -281,14 +302,16 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v exports[`options validate should throw an error on the "http2" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.http2 should be a boolean. - -> Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2" + -> Allows to serve over HTTP/2 using SPDY. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttp2" `; exports[`options validate should throw an error on the "https" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https should be a boolean. * options.https should be an object: @@ -299,7 +322,8 @@ exports[`options validate should throw an error on the "https" option with '{"ca "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.cacert should be one of these: string | Buffer @@ -313,7 +337,8 @@ exports[`options validate should throw an error on the "https" option with '{"ce "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.cert should be one of these: string | Buffer @@ -333,7 +358,8 @@ exports[`options validate should throw an error on the "https" option with '{"ke "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.key should be one of these: string | Buffer @@ -353,7 +379,8 @@ exports[`options validate should throw an error on the "https" option with '{"pf "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.pfx should be one of these: string | Buffer @@ -373,7 +400,8 @@ exports[`options validate should throw an error on the "ipc" option with '{}' va "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.ipc should be one of these: non-empty string | true - -> Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc + -> Listen to a unix socket. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc Details: * options.ipc should be a non-empty string. * options.ipc should be a true. @@ -384,7 +412,8 @@ exports[`options validate should throw an error on the "ipc" option with 'false' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.ipc should be one of these: non-empty string | true - -> Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc + -> Listen to a unix socket. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc Details: * options.ipc should be a non-empty string. * options.ipc should be true." @@ -393,19 +422,22 @@ exports[`options validate should throw an error on the "ipc" option with 'false' exports[`options validate should throw an error on the "onAfterSetupMiddleware" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onAfterSetupMiddleware should be an instance of function. - -> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" + -> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" `; exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onBeforeSetupMiddleware should be an instance of function. - -> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" + -> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" `; exports[`options validate should throw an error on the "onListening" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onListening should be an instance of function. - -> Provides the ability to execute a custom function when dev server starts listening. https://webpack.js.org/configuration/dev-server/#devserveronlistening" + -> Provides the ability to execute a custom function when dev server starts listening. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronlistening" `; exports[`options validate should throw an error on the "open" option with '' value 1`] = ` @@ -417,7 +449,8 @@ exports[`options validate should throw an error on the "open" option with '{"app "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.open should be one of these: [non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? } - -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveropen Details: * options.open.app should be one of these: object { name?, arguments? } | non-empty string @@ -438,7 +471,8 @@ exports[`options validate should throw an error on the "open" option with '{"tar "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.open should be one of these: [non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? } - -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveropen Details: * options.open.target should be one of these: [string, ...] | string @@ -458,7 +492,8 @@ exports[`options validate should throw an error on the "port" option with 'false "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.port should be one of these: number | non-empty string | \\"auto\\" - -> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport + -> Allows to specify a port to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverport Details: * options.port should be a number. * options.port should be a non-empty string. @@ -469,7 +504,8 @@ exports[`options validate should throw an error on the "port" option with 'null' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.port should be one of these: number | non-empty string | \\"auto\\" - -> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport + -> Allows to specify a port to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverport Details: * options.port should be a number. * options.port should be a non-empty string. @@ -480,7 +516,8 @@ exports[`options validate should throw an error on the "proxy" option with 'fals "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.proxy should be one of these: object { … } | [object { … } | function, ...] - -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy + -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverproxy Details: * options.proxy should be an object: object { … } @@ -492,7 +529,8 @@ exports[`options validate should throw an error on the "proxy" option with 'func "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.proxy should be one of these: object { … } | [object { … } | function, ...] - -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy + -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverproxy Details: * options.proxy should be an object: object { … } @@ -515,7 +553,8 @@ exports[`options validate should throw an error on the "static" option with '{"p "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.publicPath should be one of these: [string, ...] (should not have fewer than 1 item) | string @@ -530,7 +569,8 @@ exports[`options validate should throw an error on the "static" option with '{"s "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.serveIndex should be one of these: boolean | object { … } @@ -545,7 +585,8 @@ exports[`options validate should throw an error on the "static" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.watch should be one of these: boolean | object { … } @@ -554,14 +595,16 @@ exports[`options validate should throw an error on the "static" option with '{"w * options.static.watch should be a boolean. * options.static.watch should be an object: object { … } - -> Options for watch, description available at https://github.com/paulmillr/chokidar#api" + -> Options for watch. + -> Read more at https://github.com/paulmillr/chokidar#api" `; exports[`options validate should throw an error on the "static" option with '0' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static should be an array: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] @@ -575,7 +618,8 @@ exports[`options validate should throw an error on the "static" option with 'nul "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static should be an array: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] @@ -589,7 +633,8 @@ exports[`options validate should throw an error on the "watchFiles" option with "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.watchFiles should be one of these: [non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? } - -> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles + -> Allows to configure list of globs/directories/files to watch for file changes. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwatchfiles Details: * options.watchFiles should be an array: [non-empty string | object { paths?, options? }, ...] @@ -602,7 +647,8 @@ exports[`options validate should throw an error on the "watchFiles" option with "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.watchFiles should be one of these: [non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? } - -> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles + -> Allows to configure list of globs/directories/files to watch for file changes. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwatchfiles Details: * options.watchFiles should be an array: [non-empty string | object { paths?, options? }, ...] @@ -621,7 +667,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer.type should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function @@ -636,7 +683,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" @@ -650,7 +698,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" diff --git a/test/__snapshots__/validate-options.test.js.snap.webpack5 b/test/__snapshots__/validate-options.test.js.snap.webpack5 index 28958a3de6..5b3294c6ea 100644 --- a/test/__snapshots__/validate-options.test.js.snap.webpack5 +++ b/test/__snapshots__/validate-options.test.js.snap.webpack5 @@ -14,7 +14,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -27,7 +28,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -40,7 +42,8 @@ exports[`options validate should throw an error on the "allowedHosts" option wit "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts should be one of these: [non-empty string, ...] (should not have fewer than 1 item) | \\"auto\\" | \\"all\\" | non-empty string - -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts + -> Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverallowedhosts Details: * options.allowedHosts should be an array: [non-empty string, ...] (should not have fewer than 1 item) @@ -53,12 +56,14 @@ exports[`options validate should throw an error on the "bonjour" option with '' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.bonjour should be one of these: boolean | object { … } - -> Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour + -> Allows to broadcasts dev server via ZeroConf networking on start. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverbonjour Details: * options.bonjour should be a boolean. * options.bonjour should be an object: object { … } - -> Options for bonjour, description available at https://github.com/watson/bonjour#initializing" + -> Options for bonjour. + -> Read more at https://github.com/watson/bonjour#initializing" `; exports[`options validate should throw an error on the "client" option with '{"logging":"silent"}' value 1`] = ` @@ -77,7 +82,8 @@ exports[`options validate should throw an error on the "client" option with '{"o "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.overlay should be one of these: boolean | object { errors?, warnings? } @@ -122,7 +128,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketTransport should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string @@ -160,7 +167,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketURL.port should be one of these: number | non-empty string @@ -174,7 +182,8 @@ exports[`options validate should throw an error on the "client" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client.webSocketURL.password should be a string. -> Tells clients connected to devServer to use the provided password to authenticate. @@ -186,7 +195,8 @@ exports[`options validate should throw an error on the "client" option with 'who "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.client should be one of these: false | object { logging?, overlay?, progress?, webSocketTransport?, webSocketURL? } - -> Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + -> Allows to specify options for client script in the browser or disable client script. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverclient Details: * options.client should be false. * options.client should be an object: @@ -196,21 +206,24 @@ exports[`options validate should throw an error on the "client" option with 'who exports[`options validate should throw an error on the "compress" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.compress should be a boolean. - -> Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress" + -> Enables gzip compression for everything served. + -> Read more at https://webpack.js.org/configuration/dev-server/#devservercompress" `; exports[`options validate should throw an error on the "devMiddleware" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.devMiddleware should be an object: object { … } - -> Provide options to 'webpack-dev-middleware' which handles webpack assets. https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware" + -> Provide options to 'webpack-dev-middleware' which handles webpack assets. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverdevmiddleware" `; exports[`options validate should throw an error on the "headers" option with '1' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.headers should be one of these: object { … } | function - -> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders + -> Allows to set custom headers on response. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders Details: * options.headers should be an object: object { … } @@ -221,7 +234,8 @@ exports[`options validate should throw an error on the "headers" option with 'fa "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.headers should be one of these: object { … } | function - -> Allows to set custom headers on response. https://webpack.js.org/configuration/dev-server/#devserverheaders + -> Allows to set custom headers on response. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverheaders Details: * options.headers should be an object: object { … } @@ -232,37 +246,43 @@ exports[`options validate should throw an error on the "historyApiFallback" opti "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.historyApiFallback should be one of these: boolean | object { … } - -> Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback + -> Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback Details: * options.historyApiFallback should be a boolean. * options.historyApiFallback should be an object: object { … } - -> Options for \`historyApiFallback\`, description available at https://github.com/bripkens/connect-history-api-fallback#options" + -> Options for \`historyApiFallback\`. + -> Read more at https://github.com/bripkens/connect-history-api-fallback#options" `; exports[`options validate should throw an error on the "host" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "host" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "host" option with 'null' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.host should be a non-empty string. - -> Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost" + -> Allows to specify a hostname to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhost" `; exports[`options validate should throw an error on the "hot" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.hot should be one of these: boolean | \\"only\\" - -> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + -> Enables Hot Module Replacement. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhot Details: * options.hot should be a boolean. * options.hot should be \\"only\\"." @@ -272,7 +292,8 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.hot should be one of these: boolean | \\"only\\" - -> Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + -> Enables Hot Module Replacement. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhot Details: * options.hot should be a boolean. * options.hot should be \\"only\\"." @@ -281,14 +302,16 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v exports[`options validate should throw an error on the "http2" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.http2 should be a boolean. - -> Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2" + -> Allows to serve over HTTP/2 using SPDY. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttp2" `; exports[`options validate should throw an error on the "https" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https should be a boolean. * options.https should be an object: @@ -299,7 +322,8 @@ exports[`options validate should throw an error on the "https" option with '{"ca "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.cacert should be one of these: string | Buffer @@ -313,7 +337,8 @@ exports[`options validate should throw an error on the "https" option with '{"ce "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.cert should be one of these: string | Buffer @@ -333,7 +358,8 @@ exports[`options validate should throw an error on the "https" option with '{"ke "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.key should be one of these: string | Buffer @@ -353,7 +379,8 @@ exports[`options validate should throw an error on the "https" option with '{"pf "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.https should be one of these: boolean | object { passphrase?, requestCert?, cacert?, key?, pfx?, cert? } - -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + -> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps Details: * options.https.pfx should be one of these: string | Buffer @@ -373,7 +400,8 @@ exports[`options validate should throw an error on the "ipc" option with '{}' va "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.ipc should be one of these: non-empty string | true - -> Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc + -> Listen to a unix socket. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc Details: * options.ipc should be a non-empty string. * options.ipc should be a true. @@ -384,7 +412,8 @@ exports[`options validate should throw an error on the "ipc" option with 'false' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.ipc should be one of these: non-empty string | true - -> Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc + -> Listen to a unix socket. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveripc Details: * options.ipc should be a non-empty string. * options.ipc should be true." @@ -393,19 +422,22 @@ exports[`options validate should throw an error on the "ipc" option with 'false' exports[`options validate should throw an error on the "onAfterSetupMiddleware" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onAfterSetupMiddleware should be an instance of function. - -> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" + -> Provides the ability to execute a custom function and apply custom middleware(s) after all other middlewares. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronaftersetupmiddleware" `; exports[`options validate should throw an error on the "onBeforeSetupMiddleware" option with 'false' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onBeforeSetupMiddleware should be an instance of function. - -> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" + -> Provides the ability to execute a custom function and apply custom middleware(s) prior to all other middlewares. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronbeforesetupmiddleware" `; exports[`options validate should throw an error on the "onListening" option with '' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.onListening should be an instance of function. - -> Provides the ability to execute a custom function when dev server starts listening. https://webpack.js.org/configuration/dev-server/#devserveronlistening" + -> Provides the ability to execute a custom function when dev server starts listening. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveronlistening" `; exports[`options validate should throw an error on the "open" option with '' value 1`] = ` @@ -417,7 +449,8 @@ exports[`options validate should throw an error on the "open" option with '{"app "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.open should be one of these: [non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? } - -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveropen Details: * options.open.app should be one of these: object { name?, arguments? } | non-empty string @@ -438,7 +471,8 @@ exports[`options validate should throw an error on the "open" option with '{"tar "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.open should be one of these: [non-empty string | object { target?, app? }, ...] | boolean | non-empty string | object { target?, app? } - -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + -> Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserveropen Details: * options.open.target should be one of these: [string, ...] | string @@ -458,7 +492,8 @@ exports[`options validate should throw an error on the "port" option with 'false "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.port should be one of these: number | non-empty string | \\"auto\\" - -> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport + -> Allows to specify a port to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverport Details: * options.port should be a number. * options.port should be a non-empty string. @@ -469,7 +504,8 @@ exports[`options validate should throw an error on the "port" option with 'null' "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.port should be one of these: number | non-empty string | \\"auto\\" - -> Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport + -> Allows to specify a port to use. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverport Details: * options.port should be a number. * options.port should be a non-empty string. @@ -480,7 +516,8 @@ exports[`options validate should throw an error on the "proxy" option with 'fals "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.proxy should be one of these: object { … } | [object { … } | function, ...] - -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy + -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverproxy Details: * options.proxy should be an object: object { … } @@ -492,7 +529,8 @@ exports[`options validate should throw an error on the "proxy" option with 'func "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.proxy should be one of these: object { … } | [object { … } | function, ...] - -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy + -> Allows to proxy requests, can be useful when you have a separate API backend development server and you want to send API requests on the same domain. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverproxy Details: * options.proxy should be an object: object { … } @@ -515,7 +553,8 @@ exports[`options validate should throw an error on the "static" option with '{"p "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.publicPath should be one of these: [string, ...] (should not have fewer than 1 item) | string @@ -530,7 +569,8 @@ exports[`options validate should throw an error on the "static" option with '{"s "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.serveIndex should be one of these: boolean | object { … } @@ -545,7 +585,8 @@ exports[`options validate should throw an error on the "static" option with '{"w "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static.watch should be one of these: boolean | object { … } @@ -554,14 +595,16 @@ exports[`options validate should throw an error on the "static" option with '{"w * options.static.watch should be a boolean. * options.static.watch should be an object: object { … } - -> Options for watch, description available at https://github.com/paulmillr/chokidar#api" + -> Options for watch. + -> Read more at https://github.com/paulmillr/chokidar#api" `; exports[`options validate should throw an error on the "static" option with '0' value 1`] = ` "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static should be an array: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] @@ -575,7 +618,8 @@ exports[`options validate should throw an error on the "static" option with 'nul "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.static should be one of these: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] | boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } - -> Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + -> Allows to configure options for serving static files from directory (by default 'public' directory). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverstatic Details: * options.static should be an array: [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] @@ -589,7 +633,8 @@ exports[`options validate should throw an error on the "watchFiles" option with "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.watchFiles should be one of these: [non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? } - -> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles + -> Allows to configure list of globs/directories/files to watch for file changes. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwatchfiles Details: * options.watchFiles should be an array: [non-empty string | object { paths?, options? }, ...] @@ -602,7 +647,8 @@ exports[`options validate should throw an error on the "watchFiles" option with "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.watchFiles should be one of these: [non-empty string | object { paths?, options? }, ...] | non-empty string | object { paths?, options? } - -> Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles + -> Allows to configure list of globs/directories/files to watch for file changes. + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwatchfiles Details: * options.watchFiles should be an array: [non-empty string | object { paths?, options? }, ...] @@ -621,7 +667,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer.type should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function @@ -636,7 +683,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" @@ -650,7 +698,8 @@ exports[`options validate should throw an error on the "webSocketServer" option "ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" | non-empty string | function | object { type?, options? } - -> Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + -> Allows to set web socket server and options (by default 'ws'). + -> Read more at https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver Details: * options.webSocketServer should be one of these: \\"sockjs\\" | \\"ws\\" diff --git a/test/cli/__snapshots__/basic.test.js.snap.webpack4 b/test/cli/__snapshots__/basic.test.js.snap.webpack4 index e6e4aa0fc8..ae483ab8a3 100644 --- a/test/cli/__snapshots__/basic.test.js.snap.webpack4 +++ b/test/cli/__snapshots__/basic.test.js.snap.webpack4 @@ -38,13 +38,13 @@ Options: --no-stats Disable stats output. --watch-options-stdin Stop watching when stdin stream has ended. --no-watch-options-stdin Do not stop watching when stdin stream has ended. - --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour + --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --bonjour Allows to broadcasts dev server via ZeroConf networking on start. + --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. --no-client Negative 'client' option. - --client-logging Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + --client-logging Allows to specify options for client script in the browser or disable client script. --client-progress Prints compilation progress in percentage in the browser. --no-client-progress Does not print compilation progress in percentage in the browser. --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. @@ -60,17 +60,17 @@ Options: --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --web-socket-server Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver - --compress Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress + --web-socket-server Allows to set web socket server and options (by default 'ws'). + --compress Enables gzip compression for everything served. --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback + --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. --no-history-api-fallback Negative 'history-api-fallback' option. - --host Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost - --hot [value] Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + --host Allows to specify a hostname to use. + --hot [value] Enables Hot Module Replacement. --no-hot Disables Hot Module Replacement. - --http2 Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2 + --http2 Allows to serve over HTTP/2 using SPDY. --no-http2 Does not serve over HTTP/2 using SPDY. - --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --https-passphrase Passphrase for a pfx file. --https-request-cert Request for an SSL certificate. @@ -79,19 +79,19 @@ Options: --https-key Path to an SSL key. --https-pfx Path to an SSL pfx file. --https-cert Path to an SSL certificate. - --ipc [value] Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload + --ipc [value] Listen to a unix socket. + --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default) - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). --no-open Does not open the default browser. --open-target Opens specified page in browser. --open-app-name Open specified browser. --open-app Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + --port Allows to specify a port to use. + --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). --no-static Negative 'static' option. --static-directory Directory for static contents. --static-public-path The static files will be available in the browser under this public path. @@ -99,10 +99,10 @@ Options: --no-static-serve-index Does not tell dev server to use serveIndex middleware. --static-watch Watches for files in static content directory. --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles + --watch-files Allows to configure list of globs/directories/files to watch for file changes. + --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. Global options: --color Enable colors on console. diff --git a/test/cli/__snapshots__/basic.test.js.snap.webpack5 b/test/cli/__snapshots__/basic.test.js.snap.webpack5 index bc84091617..f06d6a70a4 100644 --- a/test/cli/__snapshots__/basic.test.js.snap.webpack5 +++ b/test/cli/__snapshots__/basic.test.js.snap.webpack5 @@ -39,12 +39,12 @@ Options: --no-target Negative 'target' option. --watch-options-stdin Stop watching when stdin stream has ended. --no-watch-options-stdin Do not stop watching when stdin stream has ended. - --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). https://webpack.js.org/configuration/dev-server/#devserverallowedhosts - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour + --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). + --bonjour Allows to broadcasts dev server via ZeroConf networking on start. --no-bonjour Negative 'bonjour' option. --no-client Negative 'client' option. - --client-logging Allows to specify options for client script in the browser or disable client script. https://webpack.js.org/configuration/dev-server/#devserverclient + --client-logging Allows to specify options for client script in the browser or disable client script. --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. --no-client-overlay Negative 'client-overlay' option. --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. @@ -61,16 +61,16 @@ Options: --client-web-socket-url-port Tells clients connected to devServer to use the provided port. --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress + --compress Enables gzip compression for everything served. --no-compress Negative 'compress' option. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback + --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. --no-history-api-fallback Negative 'history-api-fallback' option. - --host Allows to specify a hostname to use. https://webpack.js.org/configuration/dev-server/#devserverhost - --hot [value] Enables Hot Module Replacement. https://webpack.js.org/configuration/dev-server/#devserverhot + --host Allows to specify a hostname to use. + --hot [value] Enables Hot Module Replacement. --no-hot Negative 'hot' option. - --http2 Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2 + --http2 Allows to serve over HTTP/2 using SPDY. --no-http2 Negative 'http2' option. - --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). https://webpack.js.org/configuration/dev-server/#devserverhttps + --https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). --no-https Negative 'https' option. --https-passphrase Passphrase for a pfx file. --https-request-cert Request for an SSL certificate. @@ -79,19 +79,19 @@ Options: --https-key Path to an SSL key. --https-pfx Path to an SSL pfx file. --https-cert Path to an SSL certificate. - --ipc [value] Listen to a unix socket. https://webpack.js.org/configuration/dev-server/#devserveripc - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). https://webpack.js.org/configuration/dev-server/#devserverlivereload + --ipc [value] Listen to a unix socket. + --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). --no-live-reload Negative 'live-reload' option. - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). --no-open Negative 'open' option. --open-target Opens specified page in browser. --open-app-name Open specified browser. --open-app Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). https://webpack.js.org/configuration/dev-server/#devserveropen + --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. https://webpack.js.org/configuration/dev-server/#devserverport - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + --port Allows to specify a port to use. + --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). --no-static Negative 'static' option. --static-directory Directory for static contents. --static-public-path The static files will be available in the browser under this public path. @@ -99,11 +99,11 @@ Options: --no-static-serve-index Negative 'static-serve-index' option. --static-watch Watches for files in static content directory. --no-static-watch Negative 'static-watch' option. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). https://webpack.js.org/configuration/dev-server/#devserverstatic + --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles - --web-socket-server Allows to set web socket server and options (by default 'ws'). https://webpack.js.org/configuration/dev-server/#devserverwebsocketserver + --watch-files Allows to configure list of globs/directories/files to watch for file changes. + --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. + --web-socket-server Allows to set web socket server and options (by default 'ws'). Global options: --color Enable colors on console.