@@ -64,70 +64,98 @@ Following options are available with `webpack serve`:
64
64
Usage: webpack serve|server|s [entries...] [options]
65
65
66
66
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
- -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
- --host <value> The hostname/ip address the server will bind to.
87
- --port <value> The port server will listen to.
88
- --static [value...] A directory to serve static content from.
89
- --no-static Negative 'static' option.
90
- --static-directory <value> Directory for static contents.
91
- --static-public-path <value...> The bundled files will be available in the browser under this path.
92
- --static-serve-index Tells dev-server to use serveIndex middleware.
93
- --no-static-serve-index Do not tell dev-server to use serveIndex middleware.
94
- --static-watch Watch for files in static content directory.
95
- --no-static-watch Do not watch for files in static content directory.
96
- --live-reload Enables live reloading on changing files.
97
- --no-live-reload Disables live reloading on changing files.
98
- --https Use HTTPS protocol.
99
- --no-https Do not use HTTPS protocol.
100
- --https-passphrase <value> Passphrase for a pfx file.
101
- --https-key <value> Path to an SSL key.
102
- --https-pfx <value> Path to an SSL pfx file.
103
- --https-cert <value> Path to an SSL certificate.
104
- --https-cacert <value> Path to an SSL CA certificate.
105
- --https-request-cert Request for an SSL certificate.
106
- --no-https-request-cert Do not request for an SSL certificate.
107
- --http2 Use HTTP/2, must be used with HTTPS.
108
- --no-http2 Do not use HTTP/2.
109
- --bonjour Broadcasts the server via ZeroConf networking on start.
110
- --no-bonjour Do not broadcast the server via ZeroConf networking on start.
111
- --client-hot-entry Tell devServer to inject a Hot Module Replacement entry.
112
- --no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry.
113
- --client-progress Print compilation progress in percentage in the browser.
114
- --no-client-progress Do not print compilation progress in percentage in the browser.
115
- --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings.
116
- --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings.
117
- --client-logging <value> Log level in the browser (none, error, warn, info, log, verbose).
118
- --open [value...] Open the default browser.
119
- --no-open Do not open the default browser.
120
- --open-app <value> Open specified browser.
121
- --open-target [value...] Open specified route in browser.
122
- --no-open-target Do not open specified route in browser.
123
- --history-api-fallback Fallback to /index.html for Single Page Applications.
124
- --no-history-api-fallback Do not fallback to /index.html for Single Page Applications.
125
- --compress Enable gzip compression.
126
- --no-compress Disable gzip compression.
127
- --public <value> The public hostname/ip address of the server.
128
- --firewall [value...] Enable firewall or set hosts that are allowed to access the dev server.
129
- --no-firewall Disable firewall.
130
- --watch-files <value...> Watch static files for file changes.
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-host <value> Tells clients connected to devServer to use the provided host.
90
+ --client-path <value> Tells clients connected to devServer to use the provided path to connect.
91
+ --client-port <value> Tells clients connected to devServer to use the provided port.
92
+ --client-logging <value> Specifies client properties.
93
+ --client-progress Print compilation progress in percentage in the browser.
94
+ --no-client-progress Do not print compilation progress in percentage in the browser.
95
+ --client-overlay Show a full-screen overlay in the browser when there are compiler errors or warnings.
96
+ --no-client-overlay Do not show a full-screen overlay in the browser when there are compiler errors or warnings.
97
+ --client-overlay-errors Show a full-screen overlay in the browser when there are compiler errors.
98
+ --no-client-overlay-errors Negative 'client-overlay-errors' option.
99
+ --client-overlay-warnings Show a full-screen overlay in the browser when there are compiler warnings.
100
+ --no-client-overlay-warnings Negative 'client-overlay-warnings' option.
101
+ --client-need-client-entry Tells devServer to inject a client entry.
102
+ --no-client-need-client-entry Negative 'client-need-client-entry' option.
103
+ --client-hot-entry Tells devServer to inject a Hot Module Replacement entry.
104
+ --no-client-hot-entry Do not tell devServer to inject a Hot Module Replacement entry.
105
+ --web-socket-server <value> Allows to set web socket server and options.
106
+ --web-socket-server-type <value> Allows to set web socket server and options.
107
+ --compress Enable gzip compression for everything served.
108
+ --no-compress Disable gzip compression.
109
+ --firewall [value...] Defines routes which are enabled by default, on by default and allows localhost.
110
+ --no-firewall Disable firewall.
111
+ --firewall-reset Clear all items provided in configuration. Defines routes which are enabled by default, on by default and allows localhost.
112
+ --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.
113
+ --no-history-api-fallback Negative 'history-api-fallback' option.
114
+ --host <value> Specify a host to use. If you want your server to be accessible externally.
115
+ --hot [value] Enable webpack's Hot Module Replacement feature.
116
+ --no-hot Disable webpack's Hot Module Replacement feature.
117
+ --http2 Serve over HTTP/2 using spdy.
118
+ --no-http2 Do not use HTTP/2.
119
+ --https By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS.
120
+ --no-https Do not use HTTPS protocol.
121
+ --https-passphrase <value> Passphrase for a pfx file.
122
+ --https-request-cert Request for an SSL certificate.
123
+ --no-https-request-cert Do not request for an SSL certificate.
124
+ --https-cacert <value> Path to an SSL CA certificate.
125
+ --https-key <value> Path to an SSL key.
126
+ --https-pfx <value> Path to an SSL pfx file.
127
+ --https-cert <value> Path to an SSL certificate.
128
+ --live-reload By default, the dev-server will reload/refresh the page when file changes are detected.
129
+ --no-live-reload Disables live reloading on changing files.
130
+ --open [value...] Tells dev-server to open the browser after server had been started. Set it to true to open your default browser.
131
+ --no-open Do not open the default browser.
132
+ --open-target [value...] Open specified route in browser.
133
+ --no-open-target Do not open specified route in browser.
134
+ --open-app-name <value...> Open specified browser.
135
+ --open-app <value> Open specified browser.
136
+ --open-reset Clear all items provided in configuration. Tells dev-server to open the browser after server had been started. Set it to true to
137
+ open your default browser.
138
+ --open-target-reset Clear all items provided in configuration. Open specified route in browser.
139
+ --open-app-name-reset Clear all items provided in configuration. Open specified browser.
140
+ --port <value> Specify a port number to listen for requests on.
141
+ --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
142
+ guess the URL of the server based on window.location, but if that fails you'll need to use this.
143
+ --static [value...] It is possible to configure advanced options for serving static files from directory. See the Express documentation for the
144
+ possible options.
145
+ --no-static Negative 'static' option.
146
+ --static-directory <value> Directory for static contents.
147
+ --static-public-path <value...> The bundled files will be available in the browser under this path.
148
+ --static-serve-index Tells dev-server to use serveIndex middleware when enabled.
149
+ --no-static-serve-index Do not tell dev-server to use serveIndex middleware.
150
+ --static-watch Watch for files in static content directory.
151
+ --no-static-watch Do not watch for files in static content directory.
152
+ --static-reset Clear all items provided in configuration. It is possible to configure advanced options for serving static files from directory.
153
+ See the Express documentation for the possible options.
154
+ --static-public-path-reset Clear all items provided in configuration. The bundled files will be available in the browser under this path.
155
+ --watch-files <value...> List of files to watch for file changes and serve.
156
+ --watch-files-paths <value...> List of files to watch for file changes and serve.
157
+ --watch-files-reset Clear all items provided in configuration. List of files to watch for file changes and serve.
158
+ --watch-files-paths-reset Clear all items provided in configuration. List of files to watch for file changes and serve.
131
159
132
160
Global options:
133
161
--color Enable colors on console.
0 commit comments