Skip to content

Latest commit

 

History

History
474 lines (279 loc) · 28.7 KB

CHANGELOG.md

File metadata and controls

474 lines (279 loc) · 28.7 KB

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

4.0.0-beta.0 (2020-11-27)

⚠ BREAKING CHANGES

  • drop support Node.js@6 and Node.js@8, minimum supported Node.js version is Node@10
  • the hot option is true by default
  • the hotOnly option was removed, if you need hot only mode, use hot: 'only' value
  • the default transportMode is switched from sockjs to ws (IE 11 and other old browsers doesn't support WebSocket, set sockjs value for transportMode if you need supports IE 11)
  • before, after and setup were removed in favor onBeforeSetupMiddleware (previously before) and onAfterSetupMiddleware options (previously after)
  • the clientOptions was renamed to the client option
  • the key, cert, pfx, pfx-passphrase, cacert, ca and requestCert options were moved to https options, please use https.{key|cert|pfx|passphrase|requestCert|cacert|ca|requestCert}
  • the sockHost, sockPath and sockPort options were removed in client option
  • the inline option (iframe live mode) was removed
  • the lazy and filename options were removed
  • the features option was removed
  • the log, logLevel, logTime, noInfo, quiet, reporter and warn options were removed in favor of built-in webpack logger, please read this to enable and setup logging output
  • the fs, index, mimeTypes, publicPath, serverSideRender, and writeToDisk options were moved in the dev option (webpack-dev-middleware options)
  • updating webpack-dev-middleware to v4, which includes many breaking options changes, please read
  • the stats option was removed, please use the stats option from webpack.config.js
  • the socket option was removed
  • the contentBase, contentBasePublicPath, serveIndex, staticOptions, watchContentBase, watchOptions were removed in favor of the static option
  • the disableHostCheck and allowedHosts options were removed in favor of the firewall option
  • server.listen() will find free port if the port is not set and the port argument is not passed, also print a warning if the port option and the port argument passed to server.listen() are different
  • the progress option is moved to the client option, set client: {progress: true}
  • the profile option was removed, to print profile data, set client: { progress: 'profile' }
  • client uses the port of the current location (location.port, equivalent to sockPort: 'location'), by default. To get previously behavior, set the client.port with the port you'd like to set
  • client uses the hostname of the current location (location.hostname), by default. To get previously behavior, set the client.host with the hostname you'd like to set

Features

  • compatibility with webpack@5
  • compatibility with webpack-cli@4
  • added the setupExitSignals option, it takes a boolean and if true (default on CLI), the server will close and exit the process on SIGINT and SIGTERM
  • update chokidar to 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

Bug Fixes

3.10.3 (2020-02-05)

Bug Fixes

3.10.2 (2020-01-31)

Bug Fixes

  • fallthrough non GET and HEAD request 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

3.10.0 (2019-12-18)

Features

  • client: allow sock port to use location's port (sockPort: 'location') (#2341) (dc10d06)
  • server: add contentBasePublicPath option (#2150) (cee700d)

Bug Fixes

3.9.0 (2019-10-22)

Bug Fixes

  • add hostname and port to bonjour name to prevent name collisions (#2276) (d8af2d9)
  • add extKeyUsage to self-signed cert (#2274) (a4dbc3b)

Features

3.8.2 (2019-10-02)

Security

  • update selfsigned package

3.8.1 (2019-09-16)

Bug Fixes

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

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: webpack#2116

3.7.2 (2019-06-17)

Bug Fixes

  • client: add default fallback for client (#2015) (d26b444)
  • open: set wait: false to run server.close successfully (#2001) (2b4cb52)
  • test: fixed ProvidePlugin.test.js (#2002) (47453cb)

3.7.1 (2019-06-07)

Bug Fixes

  • retry finding port when port is null and get ports in sequence (#1993) (bc57514)

3.7.0 (2019-06-06)

Bug Fixes

3.6.0 (2019-06-05)

Bug Fixes

Features

3.5.1 (2019-06-01)

Bug Fixes

  • allow passing promise function of webpack.config.js (#1947) (8cf1053)

3.5.0 (2019-05-31)

Bug Fixes

  • add client code for electron-renderer target (#1935) (9297988)
  • add client code for node-webkit target (#1942) (c6b2b1f)

Features

3.4.1 (2019-05-17)

Bug Fixes

3.4.0 (2019-05-17)

Bug Fixes

Features

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 setup now warning about v4 (#1684) (523a6ec)
  • regression: allow ca, key and cert will be string (#1676) (b8d5c1e)
  • regression: handle key, cert, cacert and pfx in CLI (#1688) (4b2076c)
  • regression: problem with idb-connector after update internal-ip (#1691) (eb48691)

3.1.14 (2018-12-24)

Bug Fixes

  • add workaround for Origin header in sockjs (#1608) (1dfd4fb)

3.1.13 (2018-12-22)

Bug Fixes

3.1.12 (2018-12-22)

Bug Fixes

  • regression in checkHost for checking Origin header (#1606) (8bb3ca8)

3.1.11 (2018-12-21)

Bug Fixes

3.1.10 (2018-10-23)

Bug Fixes

  • options: add writeToDisk option to schema (#1520) (d2f4902)
  • package: update sockjs-client v1.1.5...1.3.0 (url-parse vulnerability) (#1537) (e719959)
  • Server: set tls.DEFAULT_ECDH_CURVE to 'auto' (#1531) (c12def3)

3.1.9 (2018-09-24)

3.1.8 (2018-09-06)

Bug Fixes

  • package: yargs security vulnerability (dependencies) (#1492) (8fb67c9)
  • utils/createLogger: ensure quiet always takes precedence (options.quiet) (#1486) (7a6ca47)

3.1.7 (2018-08-29)

Bug Fixes

  • Server: don't use spdy on node >= v10.0.0 (#1451) (8ab9eb6)

3.1.6 (2018-08-26)

Bug Fixes

  • bin: handle process signals correctly when the server isn't ready yet (#1432) (334c3a5)
  • examples/cli: correct template path in open-page example (#1401) (df30727)
  • schema: allow the output filename to be a {Function} (#1409) (e2220c4)