4.0.0-beta.2 (2021-04-06)
⚠ BREAKING CHANGES
- the
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 thehost
option value) and--open-app <browser>
for CLI - the
useLocalIp
option was removed in favor{ host: 'local-ip' }
, alternative you can provide values:local-ipv4
for IPv4 andlocal-ipv6
for IPv6 stdin
option was removed in favor--watch-options-stdin
injectClient
andinjectHot
was removed in favorclient.needClientEntry
andclient.needHotEntry
Features
- added the
watchFiles
option, now you can reload server on file changes, for example{ watchFiles: ['src/**/*.php', 'public/**/*'] }
(#3136) (d73213a) - added more CLI options, please run
webpack server --help
(#3148) (03a2b27) - enable overlay by default (#3108) (5e05e48)
- you can specify multiple targets and browsers for the
open
option, i.e.{ open: { target: ['/my-page', '/my-other-page'], app: ['google-chrome', '--incognito'] } }
(e3c2683)
Bug Fixes
-
/webpack-dev-server
url shows list of files (#3101) (b3374c3) -
dev server client compatibility with
IE11
/IE10
/IE9
(#3129) (1e3e656)- For
IE11
/IE10
you need polyfillfetch()
andPromise
, example:
module.exports = { entry: { entry: [ 'whatwg-fetch', 'core-js/features/promise', './entry.js' ], }, };
- For
IE9
you need polyfillfetch()
andPromise
and usesockjs
for communications (becauseWebSocket
is not supported), example:
module.exports = { entry: { entry: [ 'whatwg-fetch', 'core-js/features/promise', './entry.js' ], }, devServer: { transportMode: 'sockjs', }, };
IE8 is not supported
- For
-
reduce number of
dependencies