36 KiB
Changelog
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
4.0.0-beta.2 (2021-04-06)
⚠ BREAKING CHANGES
- the
openPageoption and the--open-pageCLI 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 thehostoption value) and--open-app <browser>for CLI - the
useLocalIpoption was removed in favor{ host: 'local-ip' }, alternative you can provide values:local-ipv4for IPv4 andlocal-ipv6for IPv6 stdinoption was removed in favor--watch-options-stdininjectClientandinjectHotwas removed in favorclient.needClientEntryandclient.needHotEntry
Features
- added the
watchFilesoption, 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
openoption, i.e.{ open: { target: ['/my-page', '/my-other-page'], app: ['google-chrome', '--incognito'] } }(e3c2683)
Bug Fixes
-
/webpack-dev-serverurl shows list of files (#3101) (b3374c3) -
dev server client compatibility with
IE11/IE10/IE9(#3129) (1e3e656)- For
IE11/IE10you need polyfillfetch()andPromise, example:
module.exports = { entry: { entry: [ 'whatwg-fetch', 'core-js/features/promise', './entry.js' ], }, };- For
IE9you need polyfillfetch()andPromiseand usesockjsfor communications (becauseWebSocketis 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
4.0.0-beta.1 (2021-03-23)
⚠ BREAKING CHANGES
--hot-onlyoption was removed- default value of the
staticoption ispath.resolve(process.cwd(), 'public'), previouslypath.resolve(process.cwd(), 'static') - the
overlayoption was moved into theclientoption
Features
- add more negative flags -
--no-https,--no-http2,--no-compressand--no-history-api-fallback(#3070) (ebc966f) - allow
Booleantype for the--firewalloption (#3041) (6711c1d) - improve output for localhost and fix open (#2892) (9e65c24)
- improve output for IPv4 and IPv6 (#3092) (f362665)
Bug Fixes
- allow to open browser with
--open-page(#3032) (581ee07) - content security policy issue in client log (2de2e01)
- empty and multiple entries support (#2920) (45f6592)
- improve descriptions for CLI options (#3021) (7d339d4)
- improve descriptions for negative flags (#3029) (2e2190a)
- multi compiler mode with proxy (#2905) (247a92b)
- remove double brackets from the ws url when using raw IPv6 address (#2951) (2ec8160)
- show correct url in output status (#3013) (06b3d91)
- show detailed error in overlay (ba01b05)
- support
file:andchrome-extension:protocols in client (#2954) (163bdce) - warnings in overlay (#3054) (6144c8d)
- webpack-cli installation message (#2955) (b9ce07f)
4.0.0-beta.0 (2020-11-27)
⚠ BREAKING CHANGES
- drop support
Node.js@6andNode.js@8, minimum supportedNode.jsversion isNode@10 - the
hotoption istrueby default - the
hotOnlyoption was removed, if you need hot only mode, usehot: 'only'value - the default
transportModeis switched fromsockjstows(IE 11 and other old browsers doesn't support WebSocket, setsockjsvalue fortransportModeif you need supports IE 11) before,afterandsetupwere removed in favoronBeforeSetupMiddleware(previouslybefore) andonAfterSetupMiddlewareoptions (previouslyafter)- the
clientOptionswas renamed to theclientoption - the
key,cert,pfx,pfx-passphrase,cacert,caandrequestCertoptions were moved tohttpsoptions, please usehttps.{key|cert|pfx|passphrase|requestCert|cacert|ca|requestCert} - the
sockHost,sockPathandsockPortoptions were removed inclientoption - the
inlineoption (iframelive mode) was removed - the
lazyandfilenameoptions were removed - the
featuresoption was removed - the
log,logLevel,logTime,noInfo,quiet,reporterandwarnoptions were removed in favor of built-in webpack logger, please read this to enable and setup logging output - the
fs,index,mimeTypes,publicPath,serverSideRender, andwriteToDiskoptions were moved in thedevoption (webpack-dev-middlewareoptions) - updating
webpack-dev-middlewareto v4, which includes many breaking options changes, please read - the
statsoption was removed, please use thestatsoption fromwebpack.config.js - the
socketoption was removed - the
contentBase,contentBasePublicPath,serveIndex,staticOptions,watchContentBase,watchOptionswere removed in favor of thestaticoption - the
disableHostCheckandallowedHostsoptions were removed in favor of thefirewalloption server.listen()will find free port if theportis not set and theportargument is not passed, also print a warning if theportoption and theportargument passed toserver.listen()are different- the
progressoption is moved to theclientoption, setclient: {progress: true} - the
profileoption was removed, to print profile data, setclient: { progress: 'profile' } - client uses the port of the current location (
location.port, equivalent tosockPort: 'location'), by default. To get previously behavior, set theclient.portwith the port you'd like to set - client uses the hostname of the current location (
location.hostname), by default. To get previously behavior, set theclient.hostwith the hostname you'd like to set
Features
- compatibility with
webpack@5 - compatibility with
webpack-cli@4 - added the
setupExitSignalsoption, it takes a boolean and if true (default on CLI), the server will close and exit the process on SIGINT and SIGTERM - update
chokidarto v3
Notes
Unfortunately, due to the huge amount of changes it is very difficult to display all changes in a convenient form. Therefore, we offer you a couple of popular examples (feel free to send a PR with more examples).
static
Previously contentBase, contentBasePublicPath, serveIndex, staticOptions, watchContentBase and watchOptions
module.exports = {
// ...
devServer: {
// Can be:
// static: path.resolve(__dirname, 'static')
// static: false
static: [
// Simple example
path.resolve(__dirname, 'static'),
// Complex example
{
directory: path.resolve(__dirname, 'static'),
staticOptions: {},
// Don't be confused with `dev.publicPath`, it is `publicPath` for static directory
// Can be:
// publicPath: ['/static-public-path-one/', '/static-public-path-two/'],
publicPath: '/static-public-path/',
// Can be:
// serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)
serveIndex: true,
// Can be:
// watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
watch: true,
},
],
},
};
publicPath
module.exports = {
// ...
devServer: {
dev: {
publicPath: '/publicPathForDevServe',
},
},
};
firewall
Previously disableHostCheck and allowedHosts
module.exports = {
// ...
devServer: {
// Can be
// firewall: ['192.168.0.1', 'domain.com']
firewall: false,
},
};
logging
module.exports = {
// ...
infrastructureLogging: {
// Only warnings and errors
// level: 'none' disable logging
// Please read https://webpack.js.org/configuration/other-options/#infrastructurelogginglevel
level: 'warn',
},
};
3.11.0 (2020-05-08)
Features
- add icons for directory viewer (#2441) (e953d01)
- allow multiple
contentBasePublicPathpaths (#2489) (c6bdfe4) - emit progress-update (#2498) (4808abd), closes #1666
- add invalidate endpoint (#2493) (89ffb86)
- allow open option to accept an object (#2492) (adeb92e)
Bug Fixes
- do not swallow errors from server (#2512) (06583f2)
- security vulnerability in yargs-parser (#2566) (41d1d0c)
- don't crash on setupExitSignals(undefined) (#2507) (0d5c681)
- support entry descriptor (closes #2453) (#2465) (8bbef6a)
- update jquery (#2516) (99ccfd8)
3.10.3 (2020-02-05)
Bug Fixes
3.10.2 (2020-01-31)
Bug Fixes
- fallthrough non
GETandHEADrequest to routes (#2374) (ebe8eca) - add an optional peer dependency on webpack-cli (#2396) (aa365df)
- add heartbeat for the websocket server (#2404) (1a7c827)
3.10.1 (2019-12-19)
Bug Fixes
- ie11 compatibility (1306abe)
3.10.0 (2019-12-18)
Features
- client: allow sock port to use location's port (
sockPort: 'location') (#2341) (dc10d06) - server: add
contentBasePublicPathoption (#2150) (cee700d)
Bug Fixes
- client: don't override protocol for socket connection to 127.0.0.1 (#2303) (3a31917), closes #2302
- server: respect sockPath on transportMode: 'ws' (#2310) (#2311) (e188542)
- https on chrome linux (#2330) (dc8b475)
- support webpack@5 (#2359) (8f89c01)
3.9.0 (2019-10-22)
Bug Fixes
- add
hostnameandportto bonjour name to prevent name collisions (#2276) (d8af2d9) - add
extKeyUsageto self-signed cert (#2274) (a4dbc3b)
Features
3.8.2 (2019-10-02)
Security
- update
selfsignedpackage
3.8.1 (2019-09-16)
Bug Fixes
- add null check for connection.headers (#2200) (7964997)
- false positive for an absolute path in the
ContentBaseoption on windows (#2202) (68ecf78) - add status in quiet log level (#2235) (7e2224e)
- scriptHost in client (#2246) (00903f6)
3.8.0 (2019-08-09)
Bug Fixes
- server: fix setupExitSignals usage (#2181) (bbe410e)
- server: set port before instantiating server (#2143) (cfbf229)
- check for name of HotModuleReplacementPlugin to avoid RangeError (#2146) (4579775)
- server: check for external urls in array (#1980) (fa78347)
- server: fix header check for socket server (#2077) (7f51859)
- server: stricter headers security check (#2092) (078ddca)
Features
- server: add transportMode (#2116) (b5b9cb4)
- server: serverMode 'ws' option (#2082) (04483f4)
- server/client: made progress option available to API (#1961) (56274e4)
Potential Breaking changes
We have migrated serverMode and clientMode to transportMode as an experimental option. If you want to use this feature, you have to change your settings.
Related PR: https://github.com/webpack/webpack-dev-server/pull/2116
3.7.2 (2019-06-17)
Bug Fixes
- client: add default fallback for client (#2015) (d26b444)
- open: set
wait: falseto run server.close successfully (#2001) (2b4cb52) - test: fixed ProvidePlugin.test.js (#2002) (47453cb)
3.7.1 (2019-06-07)
Bug Fixes
3.7.0 (2019-06-06)
Bug Fixes
- change clientLogLevel order to be called first (#1973) (57c8c92)
- es6 syntax in client (#1982) (802aa30)
3.6.0 (2019-06-05)
Bug Fixes
- config: enable
--overlay(#1968) (dc81e23) - server: don't ignore node_modules by default (#1970) (699f8b4), closes #1794
Features
3.5.1 (2019-06-01)
Bug Fixes
3.5.0 (2019-05-31)
Bug Fixes
- add client code for
electron-renderertarget (#1935) (9297988) - add client code for
node-webkittarget (#1942) (c6b2b1f)
Features
- server:
onListeningoption (#1930) (61d0cdf) - server: add callback support for invalidate (#1900) (cd218ef)
- server: add
WEBPACK_DEV_SERVERenv variable (#1929) (856169e)
3.4.1 (2019-05-17)
Bug Fixes
3.4.0 (2019-05-17)
Bug Fixes
- don't use self.location.port (#1838) (6d31984)
- do not include config files in dist (#1883) (c535bb2)
- only add client entry to web targets (#1775) (cf4d0d0)
- update clientLogLevel to match docs and error (#1825) (7f52bbf)
- add errors-warnings preset (#1895) (2a81ad2)
Features
- added injectClient option (#1775) (cf4d0d0)
- added injectHot option (#1775) (cf4d0d0)
- added sockPort option (#1792) (58d1682)
- added sockHost option (#1858) (f47dff2)
- support HEAD method (#1875) (c2360e4)
- added liveReload option (#1889) (fc4fe32)
- update express to 4.17 version
3.3.1 (2019-04-09)
Bug Fixes
- regression: always get necessary stats for hmr (#1780) (66b04a9)
- regression: host and port can be undefined or null (#1779) (028ceee)
- only add entries after compilers have been created (#1774) (b31cbaa)
3.3.0 (2019-04-08)
Bug Fixes
- compatibility with webpack-cli@3.3 (#1754) (fd7cb0d)
- ignore proxy when bypass return false (#1696) (aa7de77)
- respect stats option from webpack config (#1665) (efaa740)
- use location.port when location.hostname is used to infer HMR socket URL (#1664) (2f7f052)
- don't crash with express.static.mime.types (#1765) (919ff77)
Features
- add option "serveIndex" to enable/disable serveIndex middleware (#1752) (d5d60cb)
- add webpack as argument to before and after options (#1760) (0984d4b)
- http2 option to enable/disable HTTP/2 with HTTPS (#1721) (dcd2434)
- random port retry logic (#1692) (419f02e)
- relax depth limit from chokidar for content base (#1697) (7ea9ab9)
3.2.1 (2019-02-25)
Bug Fixes
- deprecation message about
setupnow warning aboutv4(#1684) (523a6ec) - regression: allow
ca,keyandcertwill be string (#1676) (b8d5c1e) - regression: handle
key,cert,cacertandpfxin CLI (#1688) (4b2076c) - regression: problem with
idb-connectorafter updateinternal-ip(#1691) (eb48691)
3.1.14 (2018-12-24)
Bug Fixes
3.1.13 (2018-12-22)
Bug Fixes
3.1.12 (2018-12-22)
Bug Fixes
3.1.11 (2018-12-21)
Bug Fixes
- bin/options: correct check for color support (
options.color) (#1555) (55398b5) - package: update
spdyv3.4.1...4.0.0 (assertion error) (#1491) (#1563) (7a3a257) - Server: correct
nodeversion checks (#1543) (927a2b3) - Server: mime type for wasm in contentBase directory (#1575) (#1580) (fadae5d)
- add url for compatibility with webpack@5 (#1598) (#1599) (68dd49a)
- check origin header for websocket connection (#1603) (b3217ca)
3.1.10 (2018-10-23)
Bug Fixes
- options: add
writeToDiskoption to schema (#1520) (d2f4902) - package: update
sockjs-clientv1.1.5...1.3.0 (url-parsevulnerability) (#1537) (e719959) - Server: set
tls.DEFAULT_ECDH_CURVEto'auto'(#1531) (c12def3)
3.1.9 (2018-09-24)
3.1.8 (2018-09-06)
Bug Fixes
- package:
yargssecurity vulnerability (dependencies) (#1492) (8fb67c9) - utils/createLogger: ensure
quietalways takes precedence (options.quiet) (#1486) (7a6ca47)