webpack v5.0.0-beta.29 Release Notes
Release Date: 2020-08-28 // over 3 years ago-
๐ฅ Breaking Changes
- ๐ config options have moved
cache.managedPaths/immutablePaths
->snapshot.managedPaths/immutablePaths
output.hotUpdateFunction
->output.hotUpdateGlobal
output.jsonpFunction
->output.chunkLoadingGlobal
output.chunkCallbackFunction
->output.chunkLoadingGlobal
๐ Features
new RegExp()
can be evaluated now, e. g. when used inrequire.context
- โ add additional logging for FileSystemInfo regarding snapshotting
- ๐ new config options how snapshots are created.
snapshot.module
: Snapshots for building of modulessnapshot.resolve
: Snapshots for resolving of requestssnapshot.buildDependencies
: Snapshots for build dependencies when using the persistent cachesnapshot.resolveBuildDependencies
: Snapshots for resolving of build dependencies when using the persistent cache
- ๐ new options:
output.chunkLoading
: The method of loading chunks (methods included by default are 'jsonp' (web), 'import-scripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).output.chunkFormat
: The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), but others might be added by plugins).- defaults are chosen based on
target
option output.enabledChunkLoadingTypes
: List of chunk loading types enabled. Will be automatically filled by webpack. Only needed when using a function asentry
option and returningchunkLoading
option from there.entry.*.chunkLoading
: Likeoutput.chunkLoading
but only for this entry.
- ๐
output.library
andoutput.chunkLoading
now also allow any string in schema, to support adding custom types via plugins.
๐ Changes
- in production mode module snapshotting will use timestamp + hash mode to allow persistent caching on CI
- 0๏ธโฃ
output.globalObject
defaults toself
instead ofwindow
of web-like targets
๐ Bugfixes
- ๐ fix generated code for
export default function*() {}
- ๐ allow caching of modules that are not parsed because of
module.noParse
- ๐ fix generated code of
new.target
- avoid using
require("module").builtinModules
for getting node.js built-in modules - ๐ fix watching when more than 2000 directories are watched on MacOS
๐ Performance
- ๐ Performance improvements for snapshotting
- snapshot content other than file timestamps is deduplicated
- lazy deserialize inner source in CachedSource
- ๐ avoid touching LazySet for cache dependencies from ModuleFactory to avoid eager merging
- ๐ refactor how cache dependencies are read from Modules for performance
- store cache dependencies instead of Snapshot to avoid duplicate serialization and allow deduplication
- create multiple files when more then 50k cache items are stored at once
- โก๏ธ optimize serialization of lazy deserialized content in BinaryMiddleware
- ๐ config options have moved