Skip to content

Commit 6e54af4

Browse files
committed
feat: cli-flags
1 parent 84a811c commit 6e54af4

File tree

2 files changed

+171
-163
lines changed

2 files changed

+171
-163
lines changed

README.md

Lines changed: 93 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -64,94 +64,99 @@ Following options are available with `webpack serve`:
6464
Usage: webpack serve|server|s [entries...] [options]
6565
6666
Options:
67-
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
68-
--config-name <value...> Name of the configuration to use.
69-
-m, --merge Merge two or more configurations using 'webpack-merge'.
70-
--env <value...> Environment passed to the configuration when it is a function.
71-
--node-env <value> Sets process.env.NODE_ENV to the specified value.
72-
--progress [value] Print compilation progress during build.
73-
-j, --json [value] Prints result as JSON or store it in a file.
74-
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
75-
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
76-
-t, --target <value> Sets the build target e.g. node.
77-
-d, --devtool <value> Determine source maps to use.
78-
--no-devtool Do not generate source maps.
79-
--mode <value> Defines the mode to pass to webpack.
80-
--name <value> Name of the configuration. Used when loading multiple configurations.
81-
--stats [value] It instructs webpack on how to treat the stats e.g. verbose.
82-
--no-stats Disable stats output.
83-
--watch-options-stdin Stop watching when stdin stream has ended.
84-
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
85-
--bonjour Broadcasts the server via ZeroConf networking on start.
86-
--no-bonjour Do not broadcast the server via ZeroConf networking on start.
87-
--client-transport <value> Allows to set custom transport to communicate with server.
88-
--client-host <value> Tells clients connected to devServer to use the provided host.
89-
--client-path <value> Tells clients connected to devServer to use the provided path to connect.
90-
--client-port <value> Tells clients connected to devServer to use the provided port.
91-
--client-logging <value> Specifies client properties.
92-
--client-progress Print compilation progress in percentage in the browser.
93-
--no-client-progress Do not print compilation progress in percentage in the browser.
94-
--client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings.
95-
--no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings.
96-
--client-overlay-errors Show a full-screen overlay in the browser when there are compiler errors.
97-
--no-client-overlay-errors Negative 'client-overlay-errors' option.
98-
--client-overlay-warnings Show a full-screen overlay in the browser when there are compiler warnings.
99-
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
100-
--client-need-client-entry Tells devServer to inject a client entry.
101-
--no-client-need-client-entry Negative 'client-need-client-entry' option.
102-
--client-hot-entry Tells devServer to inject a Hot Module Replacement entry.
103-
--no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry.
104-
--web-socket-server <value> Allows to set web socket server and options.
105-
--web-socket-server-type <value> Allows to set web socket server and options.
106-
--compress Enable gzip compression for everything served.
107-
--no-compress Disable gzip compression.
108-
--firewall [value...] Defines routes which are enabled by default, on by default and allows localhost.
109-
--no-firewall Disable firewall.
110-
--firewall-reset Clear all items provided in firewall configuration.
111-
--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.
112-
--no-history-api-fallback Negative 'history-api-fallback' option.
113-
--host <value> Specify a host to use. If you want your server to be accessible externally.
114-
--hot [value] Enable webpack's Hot Module Replacement feature.
115-
--no-hot Disable webpack's Hot Module Replacement feature.
116-
--http2 Serve over HTTP/2 using spdy.
117-
--no-http2 Do not use HTTP/2.
118-
--https By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS.
119-
--no-https Do not use HTTPS protocol.
120-
--https-passphrase <value> Passphrase for a pfx file.
121-
--https-request-cert Request for an SSL certificate.
122-
--no-https-request-cert Do not request for an SSL certificate.
123-
--https-cacert <value> Path to an SSL CA certificate.
124-
--https-key <value> Path to an SSL key.
125-
--https-pfx <value> Path to an SSL pfx file.
126-
--https-cert <value> Path to an SSL certificate.
127-
--live-reload By default, the dev-server will reload/refresh the page when file changes are detected.
128-
--no-live-reload Disables live reloading on changing files.
129-
--open [value...] Tells dev-server to open the browser after server had been started. Set it to true to open your default browser.
130-
--no-open Do not open the default browser.
131-
--open-target [value...] Open specified route in browser.
132-
--no-open-target Do not open specified route in browser.
133-
--open-app-name <value...> Open specified browser.
134-
--open-app <value> Open specified browser.
135-
--open-reset Clear all items provided in open configuration.
136-
--open-target-reset Clear all items provided in open.target configuration.
137-
--open-app-name-reset Clear all items provided in open.app.name configuration.
138-
--port <value> Specify a port number to listen for requests on.
139-
--public <value> When using dev server and you're proxying dev-server, the client script does not always know where to connect to. It will try to guess the URL of the
140-
server based on window.location, but if that fails you'll need to use this.
141-
--static [value...] It is possible to configure advanced options for serving static files from directory. See the Express documentation for the possible options.
142-
--no-static Negative 'static' option.
143-
--static-directory <value> Directory for static contents.
144-
--static-public-path <value...> The bundled files will be available in the browser under this path.
145-
--static-serve-index Tells dev-server to use serveIndex middleware when enabled.
146-
--no-static-serve-index Do not tell dev-server to use serveIndex middleware.
147-
--static-watch Watch for files in static content directory.
148-
--no-static-watch Do not watch for files in static content directory.
149-
--static-reset Clear all items provided in static configuration.
150-
--static-public-path-reset Clear all items provided in static.publicPath configuration.
151-
--watch-files <value...> List of files to watch for file changes and serve.
152-
--watch-files-paths <value...> List of files to watch for file changes and serve.
153-
--watch-files-reset Clear all items provided in watchFiles configuration.
154-
--watch-files-paths-reset Clear all items provided in watchFiles.paths configuration.
67+
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
68+
--config-name <value...> Name of the configuration to use.
69+
-m, --merge Merge two or more configurations using 'webpack-merge'.
70+
--env <value...> Environment passed to the configuration when it is a function.
71+
--node-env <value> Sets process.env.NODE_ENV to the specified value.
72+
--progress [value] Print compilation progress during build.
73+
-j, --json [value] Prints result as JSON or store it in a file.
74+
-d, --devtool <value> Determine source maps to use.
75+
--no-devtool Do not generate source maps.
76+
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
77+
--mode <value> Defines the mode to pass to webpack.
78+
--name <value> Name of the configuration. Used when loading multiple configurations.
79+
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
80+
--stats [value] It instructs webpack on how to treat the stats e.g. verbose.
81+
--no-stats Disable stats output.
82+
-t, --target <value...> Sets the build target e.g. node.
83+
--no-target Negative 'target' option.
84+
--watch-options-stdin Stop watching when stdin stream has ended.
85+
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
86+
--bonjour Broadcasts the server via ZeroConf networking on start.
87+
--no-bonjour Do not broadcast the server via ZeroConf networking on start.
88+
--client-transport <value> Allows to set custom transport to communicate with server.
89+
--client-logging <value> Specifies client properties.
90+
--client-progress Print compilation progress in percentage in the browser.
91+
--no-client-progress Do not print compilation progress in percentage in the browser.
92+
--client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings.
93+
--no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings.
94+
--client-overlay-errors Show a full-screen overlay in the browser when there are compiler errors.
95+
--no-client-overlay-errors Negative 'client-overlay-errors' option.
96+
--client-overlay-warnings Show a full-screen overlay in the browser when there are compiler warnings.
97+
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
98+
--client-need-client-entry Tells devServer to inject a client entry.
99+
--no-client-need-client-entry Negative 'client-need-client-entry' option.
100+
--client-hot-entry Tells devServer to inject a Hot Module Replacement entry.
101+
--no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry.
102+
--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
103+
to.
104+
--client-web-socket-url-host <value> Tells clients connected to devServer to use the provided host.
105+
--client-web-socket-url-port <value> Tells clients connected to devServer to use the provided port.
106+
--client-web-socket-url-path <value> Tells clients connected to devServer to use the provided path to connect.
107+
--web-socket-server <value> Allows to set web socket server and options.
108+
--web-socket-server-type <value> Allows to set web socket server and options.
109+
--compress Enable gzip compression for everything served.
110+
--no-compress Disable gzip compression.
111+
--firewall [value...] Defines routes which are enabled by default, on by default and allows localhost.
112+
--no-firewall Disable firewall.
113+
--firewall-reset Clear all items provided in firewall configuration.
114+
--history-api-fallback When using the HTML5 History API, the index.html page will likely have to be served in place of any 404
115+
responses.
116+
--no-history-api-fallback Negative 'history-api-fallback' option.
117+
--host <value> Specify a host to use. If you want your server to be accessible externally.
118+
--hot [value] Enable webpack's Hot Module Replacement feature.
119+
--no-hot Disable webpack's Hot Module Replacement feature.
120+
--http2 Serve over HTTP/2 using spdy.
121+
--no-http2 Do not use HTTP/2.
122+
--https By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS.
123+
--no-https Do not use HTTPS protocol.
124+
--https-passphrase <value> Passphrase for a pfx file.
125+
--https-request-cert Request for an SSL certificate.
126+
--no-https-request-cert Do not request for an SSL certificate.
127+
--https-cacert <value> Path to an SSL CA certificate.
128+
--https-key <value> Path to an SSL key.
129+
--https-pfx <value> Path to an SSL pfx file.
130+
--https-cert <value> Path to an SSL certificate.
131+
--live-reload By default, the dev-server will reload/refresh the page when file changes are detected.
132+
--no-live-reload Disables live reloading on changing files.
133+
--open [value...] Tells dev-server to open the browser after server had been started. Set it to true to open your default
134+
browser.
135+
--no-open Do not open the default browser.
136+
--open-target [value...] Open specified route in browser.
137+
--no-open-target Do not open specified route in browser.
138+
--open-app-name <value...> Open specified browser.
139+
--open-app <value> Open specified browser.
140+
--open-reset Clear all items provided in open configuration.
141+
--open-target-reset Clear all items provided in open.target configuration.
142+
--open-app-name-reset Clear all items provided in open.app.name configuration.
143+
--port <value> Specify a port number to listen for requests on.
144+
--public <value> The public hostname/ip address of the server that client script will try to connect to.
145+
--static [value...] It is possible to configure advanced options for serving static files from directory. See the Express
146+
documentation for the possible options.
147+
--no-static Negative 'static' option.
148+
--static-directory <value> Directory for static contents.
149+
--static-public-path <value...> The bundled files will be available in the browser under this path.
150+
--static-serve-index Tells dev-server to use serveIndex middleware when enabled.
151+
--no-static-serve-index Do not tell dev-server to use serveIndex middleware.
152+
--static-watch Watch for files in static content directory.
153+
--no-static-watch Do not watch for files in static content directory.
154+
--static-reset Clear all items provided in static configuration.
155+
--static-public-path-reset Clear all items provided in static.publicPath configuration.
156+
--watch-files <value...> List of files to watch for file changes and serve.
157+
--watch-files-paths <value...> List of files to watch for file changes and serve.
158+
--watch-files-reset Clear all items provided in watchFiles configuration.
159+
--watch-files-paths-reset Clear all items provided in watchFiles.paths configuration.
155160
156161
Global options:
157162
--color Enable colors on console.

0 commit comments

Comments
 (0)