webpack v5.0.0-beta.14 Release Notes

Release Date: 2020-03-02 // about 4 years ago
  • ๐Ÿ”„ Changes

    • 0๏ธโƒฃ optimization.sideEffects, optimization.innerGraph and optimization.usedExports are on by default now (only production before)
      • Motivation: less difference between prod and dev builds, getting sideEffects benefits in dev mode.
    • ๐Ÿ”Œ EnvironmentPlugin shows an error now when referenced env variable is missing and has no fallback
      • Motivation: Builds should fail when an expected env variable is missing
    • โœ‚ Remove serve property from schema
      • Motivation: No longer needed, as this has move to a plugin
    • ๐Ÿ”€ merge all library related options into output.library
      • output.library: { type, name, export, auxiliaryComment, umdNamedDefine }
      • old options are still possible, but no longer recommended
      • Motivation: more clear structure, easier sharing with library in the entry option

    ๐Ÿ”‹ Features

    • ๐Ÿ‘ Allow a entry description object for advanced entrypoint configuration
      • entry: { main: { ... } }
      • import: list of modules
      • filename: custom filename template
      • Using output.chunkFilename is no longer recommended and only output.filename should be used now
      • dependOn: list of other entrypoint which are expected to be available on page
      • library: library exposing
    • โž• add percentBy option to ProgressPlugin to change percent calculation
    • ๐Ÿ”Œ DefinePlugin supports arrays directly now
    • ๐Ÿ”€ sync wasm support v128 now
    • โšก๏ธ Update PnP support to pnp version 3 (yarn berry)
    • โž• add output.uniqueName option
      • defaults to the package.json name in the current directory
      • affects globals used for chunk communication e. g. output.jsonpFunction

    DX

    • ๐Ÿ‘‰ Make Compiler/Compilation.cache property read-only to make it easier to fix compat issues
    • ๐Ÿ— ProgressPlugin stores and restores counts from last build to persistent cache for better progress calculation
    • โž• Add Did you mean to error message for some common configuration mistakes

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  fix infinite loop when using export * in a circular way
    • CLI has non-zero exit code when stdin is not available to ask for webpack-cli installation
    • hoist exports in concatenated modules
      • fixes bug with circular dependencies with non-concatenated modules
    • generate valid syntax for the injected error code when modules are not found

    ๐Ÿ”จ Refactoring

    • ๐Ÿ”จ Internal refactoring of the inner graph API
    • ๐Ÿ”จ The way the default webpack configuration is created has been refactored
      • New process: 1. configuration is normalized, 2. Plugins are applied, 3. configuration defaults are set
      • This allows plugins to apply their own configuration defaults.
      • This allows to write Configuration Preset Plugins.
    • ๐Ÿ”จ refactor the way library exposing is handled

    ๐ŸŽ Performance

    • ๐ŸŒฒ Increase the time logging of the core when using verbose logging
    • ๐ŸŽ Performance improvements
      • Chunk Graph
      • Persistent Caching
      • SplitChunks
      • Chunk

    Full Changelog

    Feedback