yarn webpack-dev-server 4.0.0-beta.2
v4.0.0-beta.2

latest releases: 5.1.0, 4.15.2, 5.0.4...
3 years ago

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 the host 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 and local-ipv6 for IPv6
  • stdin option was removed in favor --watch-options-stdin
  • injectClient and injectHot was removed in favor client.needClientEntry and client.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 polyfill fetch() and Promise, example:
    module.exports = {
      entry: {
        entry: [
          'whatwg-fetch', 
          'core-js/features/promise', 
          './entry.js'
        ],
      },
    };
    • For 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

  • hostname resolving (#3128) (cd39491)

  • improve CLI options (#3151) (09fa827)

  • output description on invalid options (#3154) (2e02978)

  • prefer to open the host option (#3115) (7e525eb)

  • reduce number of dependencies

Don't miss a new webpack-dev-server release

NewReleases is sending notifications on new releases.