webpack-dev-server
Advanced tools
Changelog
4.2.0 (2021-09-09)
http.ca
option (CLI option added too) (should be used instead cacert
, because we will remove it in the next major release in favor the https.ca
option)https.crl
option (CLI options added too), more informationhttps.ca
/https.cacert
/ https.cert
/https.crl
/https.key
/https.pfx
options are now accept Arrays of Buffer
/string
/Path to file, using --https-*-reset
CLI options you can reset these optionshttps.pfx
/https.key
can be Object[]
, more informationhttps
options can now accept custom options, you can use:module.exports = {
// Other options
devServer: {
https: {
// Allow to set additional TSL options https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options
minVersion: "TLSv1.1",
ca: path.join(httpsCertificateDirectory, "ca.pem"),
pfx: path.join(httpsCertificateDirectory, "server.pfx"),
key: path.join(httpsCertificateDirectory, "server.key"),
cert: path.join(httpsCertificateDirectory, "server.crt"),
passphrase: "webpack-dev-server",
},
}
};
Changelog
4.0.0-rc.1 (2021-08-17)
target
option (#3651) (6e2cbde)infastructureLogging.level
option by default for client.logging
. (#3613) (c9ccc96)host
option (#3549) (7200d31)Changelog
4.0.0-rc.0 (2021-07-19)
client.transport
to client.webSocketTransport
this.webSocketServer.clients
hotEntry
and needClientEntry
) in favor manual setup entries (#3494)reset
option, please look them in webpack serve --help
host
and port
options can't be null
or empty stringauto
(#3297) (437c8d3)<url>
pattern for open and allow to use multiple browsers (#3496) (7c7ccf9)client.webSocketURL.port
(#3354) (f5e7f8f)webSocketServer: false
(f62f20f)username
and password
in clientURL (#3452) (a7225d5)compress
by default (#3303) (4d251b5)client.webSocketURL.protocol
option (#3380) (8998d6b)ipc
option was added for unix socket (#3479) (b559738)Function
in headers option (#3267) (28f9597)80
port for dev server (#3487) (22f18eb)App updated. Recompiling...
(#3488) (a2e3ead)port
(#3372) (8c53102)allowedHosts
option (#3451) (17aa345)host
option can't be null
or empty string (#3352) (216b0d3)firewall
option to allowedHosts
option (#3345) (81e4e55)port
and bonjour
(c2805fe)path
to pathname
for client.webSocketURL
(#3466) (fd63e02)logLevel
and logProvider
option for proxy (#3257) (199baec)Changelog
4.0.0-beta.3 (2021-05-06)
https.ca
option was removed in favor the https.cacert
optiondev
option was renamed to devMiddleware
client.overlay
option is true
by default and show warnings by defaultwebpack-dev-server
, please update webpack-cli
to v4.7.0
(#3185) (0c3f817)12.13.0
https.cacert
(#3240) (b212a2c)webpack server --help
to look at them (#3238) (469e558)bonjour
options (#3202) (5534583)open
(#3191) (d473fd9)client.logging
option for HMR logging (#3159) (6f3c6ba)client.needClientEntry
and client.needHotEntry
options (#3178) (a2b6db9)open
optionChangelog
4.0.0-beta.2 (2021-04-06)
openPage
option and the --open-page
CLI option were removed in favor { open: ['/my-page', '/my-other-page/'] }
for Node.js API and --open-target [URL]
(without [URL]
dev server will open a browser using the host
option value) and --open-app <browser>
for CLIuseLocalIp
option was removed in favor { host: 'local-ip' }
, alternative you can provide values: local-ipv4
for IPv4 and local-ipv6
for IPv6stdin
option was removed in favor --watch-options-stdin
injectClient
and injectHot
was removed in favor client.needClientEntry
and client.needHotEntry
watchFiles
option, now you can reload server on file changes, for example { watchFiles: ['src/**/*.php', 'public/**/*'] }
(#3136) (d73213a)webpack server --help
(#3148) (03a2b27)open
option, i.e. { open: { target: ['/my-page', '/my-other-page'], app: ['google-chrome', '--incognito'] } }
(e3c2683)/webpack-dev-server
url shows list of files (#3101) (b3374c3)
dev server client compatibility with IE11
/IE10
/IE9
(#3129) (1e3e656)
IE11
/IE10
you need polyfill fetch()
and Promise
, example:module.exports = {
entry: {
entry: [
'whatwg-fetch',
'core-js/features/promise',
'./entry.js'
],
},
};
IE9
you need polyfill fetch()
and Promise
and use sockjs
for communications (because WebSocket
is not supported), example:module.exports = {
entry: {
entry: [
'whatwg-fetch',
'core-js/features/promise',
'./entry.js'
],
},
devServer: {
transportMode: 'sockjs',
},
};
IE8 is not supported
reduce number of dependencies
Changelog
4.0.0-beta.1 (2021-03-23)
--hot-only
option was removedstatic
option is path.resolve(process.cwd(), 'public')
, previously path.resolve(process.cwd(), 'static')
overlay
option was moved into the client
option--no-https
, --no-http2
, --no-compress
and --no-history-api-fallback
(#3070) (ebc966f)Boolean
type for the --firewall
option (#3041) (6711c1d)--open-page
(#3032) (581ee07)file:
and chrome-extension:
protocols in client (#2954) (163bdce)