yarn webpack 5.25.0

latest releases: 5.94.0, 5.93.0, 5.92.1...
3 years ago

Features

  • Refactor the startup logic to improve library support
  • add __webpack_runtime_id__ to access the current runtime id
  • improve error handling for HMR
    • add second argument to self accept error handler to pass new module and module id
    • add error handler argument to dependency accept, passing error and module ids
  • add output.strictModuleErrorHandling to opt into stricter evaluation error handling semantics according to ESM spec
    • used by default when HMR is enabled
  • when ignoring a module used by new URL() this will result in an url to a empty file ("data:,")
  • add module.generator.asset.emit option to disable creating assets from asset modules (e. g. for SSR)

Bugfixes

  • fix problem when library options apply to a non-runtime chunk
  • fix crash in splitChunks.maxSize where negative indicies are accessed
  • fix sub-optimal splitting of splitChunks.maxSize in some cases when multiple size types are involved
  • fix a memory leak in AssetGenerator
  • fix usage of runtime globals in SharedPlugin to support HMR updates

Deprecations

  • deprecate output.strictModuleExceptionHandling (this is the CommonJS way of handling errors, and the name is weird)

Don't miss a new webpack release

NewReleases is sending notifications on new releases.