webpack v5.0.0-beta.14 Release Notes
Release Date: 2020-03-02 // about 4 years ago-
๐ Changes
- 0๏ธโฃ
optimization.sideEffects
,optimization.innerGraph
andoptimization.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 theentry
option
๐ Features
- ๐ Allow a entry description object for advanced entrypoint configuration
entry: { main: { ... } }
import
: list of modulesfilename
: custom filename template- Using
output.chunkFilename
is no longer recommended and onlyoutput.filename
should be used now dependOn
: list of other entrypoint which are expected to be available on pagelibrary
: 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
- 0๏ธโฃ