github webpack/webpack v5.12.0

latest releases: v5.91.0, v5.90.3, v5.90.2...
3 years ago

Features

  • add experiments.layers
    • entry.xxx.layer: "name-of-layer" allows to set the layer for an entrypoint
    • module.rules[].issuerLayer: RuleCondition allows to filter/match by layer of issuer
    • module.rules[].layer: "name-of-layer" allows to set the layer of an module
    • splitChunks.cacheGroups.xxx.layer allows to select modules by layer
    • externals.byLayer["name-of-layer"] allows to specify externals by layer
    • externals.byLayer: (layer) => ... allows to specify externals by layer
    • externals function has an additional argument property contextInfo which contains info about the issuer (e. g. the layer)
  • add module.parser and module.generator options to allow to specify parser/generator options globally per module type
  • make chunkId variable available in script tag hook (like it was with webpack 4)

Bugfixes

  • escape exclamation marks in context regexp when generating readable module names/ids
  • fix a problem when bundling webpack bundles with enabled eval-based devtools
  • add stats.nestedModulesSpace to schema to allow to specify this option
  • fix a bug that incorrectly replaces new.target with constants
  • fix a bug where splitChunk minSize is not handled correctly
  • fix a bug where the order of splitChunk cacheGroups is not handled correctly
  • avoid adding non-filesystem resources as dependencies for watching and caching

Developer experience

  • fix incorrect negation in hint comment for eval-based devtools
  • improve error messages of "Library/Chunk Loading/Wasm Loading typeof is not enabled" errors
  • improve question message when asking to install webpack-cli
  • show a warning when loaders/plugins report invalid dependencies to webpack

Contributing

  • examples use webpack-cli 4 now
  • rename memorize to memoize

Don't miss a new webpack release

NewReleases is sending notifications on new releases.