webpack v5.0.0-rc.1 Release Notes

Release Date: 2020-09-28 // over 3 years ago
  • ๐Ÿ’ฅ Breaking Changes

    • 0๏ธโƒฃ uses target: "browserslist" as default when a browserslist config has been found, otherwise fallback to target: "web" as usual
      • This could have unexpected changed to the EcmaScript version of the generated code
      • In same cases this might causes builds to fail because browserslist contain web and node versions
      • In most cases we expect this to simplify migration while still allowing to generate better code
      • This partially reverts a breaking change: Instead of changing the generated code from ES5 to ES6, this now changes it from ES5 to an automatic version depending on browserslist when available

    ๐Ÿ”‹ Features

    • โž• add support for target: "browserslist" and more advanced options
    • ๐Ÿ”ฆ expose more classes as needed by plugins
    • โž• add Compiler.watching
    • โž• add parser.worker for javascript files to allow to modify which syntax is special for WebWorker support
    • ๐Ÿ‘ allow output.chunkFilename to be a function via schema
    • ๐Ÿ‘ allow RegExp for watchOptions.ignored via schema
    • โž• add resolve.preferRelative option, which allows to resolve module requests also as relative requests

    Migration

    • โž• add more hints regarding breaking changes in config
    • ๐Ÿ‘Œ improve deprecation layer for Array -> Set to allow accessing the first index
    • ๐Ÿ‘ allow to use splitChunks name to move modules to an parent chunk

    ๐Ÿ›  Bugfixes

    • avoid some errors in dependencies when target module failed
    • when min(Remaingin)Size is violated, use only modules that are fine, instead of failing for all modules
    • ๐Ÿ›  fix infinite recursion when having a circular symlink and a context containing it
    • โš  warning for importing an disposed module displays the correct module
    • ๐Ÿ›  fix too wide hash for javascript chunks that caused unnecessary invalidation of the rendered files
    • ๐Ÿ›  fix new URL("relative/file.png", import.meta.url) to resolve relative
    • โšก๏ธ update webpack-sources to fix crash with source "." is not in SourceMap
    • ๐Ÿ›  fix stack overflow in resolving