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
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