Skip to content

Commit

Permalink
feat: cli options (#3325)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: you need to reset CLI options
  • Loading branch information
snitin315 authored Jun 8, 2021
1 parent 84bd080 commit 70ed7dc
Show file tree
Hide file tree
Showing 15 changed files with 3,461 additions and 2,736 deletions.
157 changes: 95 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,68 +64,101 @@ Following options are available with `webpack serve`:
Usage: webpack serve|server|s [entries...] [options]
Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> 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 <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
--mode <value> Defines the mode to pass to webpack.
--name <value> Name of the configuration. Used when loading multiple configurations.
-o, --output-path <value> 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 <value...> 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.
--host <value> The hostname/ip address the server will bind to.
--port <value> The port server will listen to.
--static [value...] A directory to serve static content from.
--no-static Negative 'static' option.
--static-directory <value> Directory for static contents.
--static-public-path <value...> The bundled files will be available in the browser under this path.
--static-serve-index Tells dev-server to use serveIndex middleware.
--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.
--live-reload Enables live reloading on changing files.
--no-live-reload Disables live reloading on changing files.
--https Use HTTPS protocol.
--no-https Do not use HTTPS protocol.
--https-passphrase <value> Passphrase for a pfx file.
--https-key <value> Path to an SSL key.
--https-pfx <value> Path to an SSL pfx file.
--https-cert <value> Path to an SSL certificate.
--https-cacert <value> Path to an SSL CA certificate.
--https-request-cert Request for an SSL certificate.
--no-https-request-cert Do not request for an SSL certificate.
--http2 Use HTTP/2, must be used with HTTPS.
--no-http2 Do not use HTTP/2.
--bonjour Broadcasts the server via ZeroConf networking on start.
--no-bonjour Do not broadcast the server via ZeroConf networking on start.
--client-hot-entry Tell devServer to inject a Hot Module Replacement entry.
--no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry.
--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-logging <value> Log level in the browser (none, error, warn, info, log, verbose).
--open [value...] Open the default browser.
--no-open Do not open the default browser.
--open-app <value> Open specified browser.
--open-target [value...] Open specified route in browser.
--no-open-target Do not open specified route in browser.
--history-api-fallback Fallback to /index.html for Single Page Applications.
--no-history-api-fallback Do not fallback to /index.html for Single Page Applications.
--compress Enable gzip compression.
--no-compress Disable gzip compression.
--allowed-hosts <value...> Set hosts that are allowed to access the dev server.
--watch-files <value...> Watch static files for file changes.
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> 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 <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
--mode <value> Defines the mode to pass to webpack.
--name <value> Name of the configuration. Used when loading multiple configurations.
-o, --output-path <value> 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 <value...> 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 <value...> 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 <value> Allows to set custom transport to communicate with server.
--client-logging <value> 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 <value> 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 <value> Tells clients connected to devServer to use the provided host.
--client-web-socket-url-port <value> Tells clients connected to devServer to use the provided port.
--client-web-socket-url-path <value> Tells clients connected to devServer to use the provided path to connect.
--web-socket-server <value> Allows to set web socket server and options.
--web-socket-server-type <value> 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 <value> 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 <value> 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 <value> Path to an SSL CA certificate.
--https-key <value> Path to an SSL key.
--https-pfx <value> Path to an SSL pfx file.
--https-cert <value> 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 <value...> Open specified browser.
--open-app <value> 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 <value> Specify a port number to listen for requests on.
--public <value> 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 <value> Directory for static contents.
--static-public-path <value...> 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 <value...> List of files to watch for file changes and serve.
--watch-files-paths <value...> 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.
Global options:
--color Enable colors on console.
Expand Down
Loading

0 comments on commit 70ed7dc

Please sign in to comment.