Features
- add
experiments.layers
entry.xxx.layer: "name-of-layer"
allows to set the layer for an entrypointmodule.rules[].issuerLayer: RuleCondition
allows to filter/match by layer of issuermodule.rules[].layer: "name-of-layer"
allows to set the layer of an modulesplitChunks.cacheGroups.xxx.layer
allows to select modules by layerexternals.byLayer["name-of-layer"]
allows to specify externals by layerexternals.byLayer: (layer) => ...
allows to specify externals by layerexternals
function has an additional argument propertycontextInfo
which contains info about the issuer (e. g. the layer)
- add
module.parser
andmodule.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