diff --git a/README.md b/README.md index 400aa49840..d54b8131aa 100644 --- a/README.md +++ b/README.md @@ -64,107 +64,116 @@ Following options are available with `webpack serve`: Usage: webpack serve|server|s [entries...] [options] Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - -d, --devtool Determine source maps to use. - --no-devtool Do not generate source maps. - --entry The entry point(s) of your application e.g. ./src/main.js. - --mode Defines the mode to pass to webpack. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path Output location of the file generated by webpack e.g. ./dist/. - --stats [value] It instructs webpack on how to treat the stats e.g. verbose. - --no-stats Disable stats output. - -t, --target Sets the build target e.g. node. - --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 Set hosts that are allowed to access the dev server. - --allowed-hosts-reset Clear all items provided in allowedHosts configuration. - --bonjour Broadcasts the server via ZeroConf networking on start. - --no-bonjour Do not broadcast the server via ZeroConf networking on start. - --client-transport Allows to set custom transport to communicate with server. - --client-logging Specifies client properties. - --client-progress Print compilation progress in percentage in the browser. - --no-client-progress Do not print compilation progress in percentage in the browser. - --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Show a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Negative 'client-overlay-errors' option. - --client-overlay-warnings Show a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Negative 'client-overlay-warnings' option. - --client-need-client-entry Tells devServer to inject a client entry. - --no-client-need-client-entry Negative 'client-need-client-entry' option. - --client-hot-entry Tells devServer to inject a Hot Module Replacement entry. - --no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry. - --client-web-socket-url When using dev server and you're proxying dev-server, the client script does not always know where to - connect to. - --client-web-socket-url-host Tells clients connected to devServer to use the provided host. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-path Tells clients connected to devServer to use the provided path to connect. - --web-socket-server Allows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options. - --compress Enable gzip compression for everything served. - --no-compress Disable gzip compression. - --firewall [value...] Defines routes which are enabled by default, on by default and allows localhost. - --no-firewall Disable firewall. - --firewall-reset Clear all items provided in firewall configuration. - --history-api-fallback When using the HTML5 History API, the index.html page will likely have to be served in place of any 404 - responses. - --no-history-api-fallback Negative 'history-api-fallback' option. - --host Specify a host to use. If you want your server to be accessible externally. - --hot [value] Enable webpack's Hot Module Replacement feature. - --no-hot Disable webpack's Hot Module Replacement feature. - --http2 Serve over HTTP/2 using spdy. - --no-http2 Do not use HTTP/2. - --https By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. - --no-https Do not use HTTPS protocol. - --https-passphrase Passphrase for a pfx file. - --https-request-cert Request for an SSL certificate. - --no-https-request-cert Do not request for an SSL certificate. - --https-cacert Path to an SSL CA certificate. - --https-key Path to an SSL key. - --https-pfx Path to an SSL pfx file. - --https-cert Path to an SSL certificate. - --live-reload By default, the dev-server will reload/refresh the page when file changes are detected. - --no-live-reload Disables live reloading on changing files. - --open [value...] Tells dev-server to open the browser after server had been started. Set it to true to open your default - browser. - --no-open Do not open the default browser. - --open-target [value...] Open specified route in browser. - --no-open-target Do not open specified route in browser. - --open-app-name Open specified browser. - --open-app Open specified browser. - --open-reset Clear all items provided in open configuration. - --open-target-reset Clear all items provided in open.target configuration. - --open-app-name-reset Clear all items provided in open.app.name configuration. - --port Specify a port number to listen for requests on. - --public The public hostname/ip address of the server that client script will try to connect to. - --static [value...] It is possible to configure advanced options for serving static files from directory. See the Express - documentation for the possible options. - --no-static Negative 'static' option. - --static-directory Directory for static contents. - --static-public-path The bundled files will be available in the browser under this path. - --static-serve-index Tells dev-server to use serveIndex middleware when enabled. - --no-static-serve-index Do not tell dev-server to use serveIndex middleware. - --static-watch Watch for files in static content directory. - --no-static-watch Do not watch for files in static content directory. - --static-reset Clear all items provided in static configuration. - --static-public-path-reset Clear all items provided in static.publicPath configuration. - --watch-files List of files to watch for file changes and serve. - --watch-files-paths List of files to watch for file changes and serve. - --watch-files-reset Clear all items provided in watchFiles configuration. - --watch-files-paths-reset Clear all items provided in watchFiles.paths configuration. + -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. + --config-name Name of the configuration to use. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --env Environment passed to the configuration when it is a function. + --node-env Sets process.env.NODE_ENV to the specified value. + --progress [value] Print compilation progress during build. + -j, --json [value] Prints result as JSON or store it in a file. + -d, --devtool Determine source maps to use. + --no-devtool Do not generate source maps. + --entry The entry point(s) of your application e.g. ./src/main.js. + --mode Defines the mode to pass to webpack. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path Output location of the file generated by webpack e.g. ./dist/. + --stats [value] It instructs webpack on how to treat the stats e.g. verbose. + --no-stats Disable stats output. + -t, --target Sets the build target e.g. node. + --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 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 Negative 'bonjour' option. + --client-hot-entry Injects a Hot Module Replacement entry. + --no-client-hot-entry Negative 'client-hot-entry' option. + --client-logging Allows to specify options for client script in the browser. + https://webpack.js.org/configuration/dev-server/#devserverclient + --client-need-client-entry Inject a client entry. + --no-client-need-client-entry Negative 'client-need-client-entry' option. + --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. + --no-client-overlay-errors Negative 'client-overlay-errors' option. + --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. + --no-client-overlay-warnings Negative 'client-overlay-warnings' option. + --client-progress Prints compilation progress in percentage in the browser. + --no-client-progress Negative 'client-progress' option. + --client-transport Allows to set custom 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-host Tells clients connected to devServer to use the provided host. + --client-web-socket-url-path Tells clients connected to devServer to use the provided path to connect. + --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. + --compress Enables gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress + --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 + --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 + --no-hot Negative 'hot' option. + --http2 Allows to serve over HTTP/2 using SPDY. https://webpack.js.org/configuration/dev-server/#devserverhttp2 + --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 + --no-https Negative 'https' option. + --https-passphrase Passphrase for a pfx file. + --https-request-cert Request for an SSL certificate. + --no-https-request-cert Negative 'https-request-cert' option. + --https-cacert Path to an SSL CA certificate. + --https-key Path to an SSL key. + --https-pfx Path to an SSL pfx file. + --https-cert Path to an SSL certificate. + --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). + https://webpack.js.org/configuration/dev-server/#devserverlivereload + --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 + --no-open Negative 'open' option. + --open-target [value...] Opens specified page in browser. + --no-open-target Negative 'open-target' option. + --open-app-name Open specified browser. + --open-app Open specified browser. + --open-reset Clear all items provided in 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-target-reset Clear all items provided in configuration. Opens specified page in browser. + --open-app-name-reset Clear all items provided in 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 + --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. + --static-serve-index Tells dev server to use serveIndex middleware when enabled. + --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 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 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 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 Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. ``` _**Note**: For more information on above options explore this [link](https://webpack.js.org/configuration/dev-server/)._