Update Webpack core packages (major)
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
webpack | dependencies | major | ^4.47.0 -> ^5.102.0 |
webpack-cli (source) | dependencies | major | ^4.10.0 -> ^6.0.1 |
webpack-dev-server | devDependencies | major | 4.15.2 -> 5.2.2 |
MR created with the help of gitlab-org/frontend/renovate-gitlab-bot
Release Notes
webpack/webpack (webpack)
v5.102.0
Features
- Added static analyze for dynamic imports
- Added support for
import file from "./file.ext" with { type: "bytes" }
to get the content asUint8Array
(look at example) - Added support for
import file from "./file.ext" with { type: "text" }
to get the content as text (look at example) - Added the
snapshot.contextModule
to configure snapshots options for context modules - Added the
extractSourceMap
option to implement the capabilities of loading source maps by comment, you don't needsource-map-loader
(look at example) - The
topLevelAwait
experiment is now stable (you can removeexperiments.topLevelAwait
from yourwebpack.config.js
) - The
layers
experiment is now stable (you can removeexperiments.layers
from yourwebpack.config.js
) - Added function matcher support in rule options
Fixes
- Fixed conflicts caused by multiple concatenate modules
- Ignore import failure during HMR update with ES modules output
- Keep render module order consistent
- Prevent inlining modules that have
this
exports - Removed unused
timeout
attribute of script tag - Supported UMD chunk format to work in web workers
- Improved CommonJs bundle to ES module library
- Use
es-lexer
formjs
files for build dependencies - Fixed support
__non_webpack_require__
for ES modules - Properly handle external modules for CSS
- AssetsByChunkName included assets from
chunk.auxiliaryFiles
- Use
createRequire
only when output is ES module and target is node - Typescript types
Performance Improvements
- Avoid extra calls for snapshot
- A avoid extra jobs for build dependencies
- Move import attributes to own dependencies
v5.101.3
Fixes
- Fixed resolve execution order issue from extra await in async modules
- Avoid empty block for unused statement
- Collect only specific expressions for destructuring assignment
v5.101.2
Fixes
- Fixed syntax error when comment is on the last line
- Handle var declaration for
createRequire
- Distinguish free variable and tagged variable
v5.101.1
Fixes
- Filter deleted assets in
processAdditionalAssets
hook - HMR failure in defer module
- Emit assets even if invalidation occurs again
- Export types for serialization and deserialization in plugins and export the
ModuleFactory
class - Fixed the failure export of internal function for ES module chunk format
- Fixed
GetChunkFilename
failure caused bydependOn
entry - Fixed the import of missing dependency chunks
- Fixed when entry chunk depends on the runtime chunk hash
- Fixed
module.exports
bundle to ESM library - Adjusted the time of adding a group depending on the fragment of execution time
- Fixed circle dependencies when require
RawModule
and condition ofisDeferred
- Tree-shakable module library should align preconditions of
allowInlineStartup
v5.101.0
Fixes
- Fixed concatenate optimization for ESM that caused undefined export
- Respect the
output.environment.nodePrefixForCoreModules
option everywhere - Respect the
output.importMetaName
option everywhere - Fixed await async dependencies when accepting them during HMR
- Better typescript types
Features
- Added colors helpers for CLI
- Enable tree-shaking for ESM external modules with named imports
- Added the
deferImport
option to parser options
Performance Improvements
- Fixed a regression in module concatenation after implementing deferred import support
- Fixed a potential performance issue in CleanPlugin
- Avoid extra
require
in some places
v5.100.2
Fixes
- Keep consistent CSS order
- Dependency without the source order attribute must keep their original index
- Keep module traversal consistent across reexport scenarios
Performance Improvements
- Extend
importPhasesPlugin
only when enabledeferImport
(#19689)
v5.100.1
Fixes
- Tree-shaking unused ignored modules
- [Types] Compatibility with old Node.js versions
v5.100.0
Fixes
- Fixed the case where an ES modules entry chunk depends on the runtime chunk hash
- Handle function exports in webpack module wrapper
- Ensure dependent chunks are imported before startup & fix duplicate export of 'default'
- Generate lose closing brace when exports are unprovided
- CleanPlugin doesn't unlink same file twice
- Fixed unexpected error codes from fs.unlink on Windows
- Typescript types
Features
- HMR support for ES modules output
- ES module output mode now fully supports
splitChunks
when external variables and runtimeChunk are not set. - Added support
using
keyword - Implemented tc39 Defer Module Evaluation (experiment)
- Support dynamic template literals expressions for
new URL(...)
- Enable ES modules worker chunk loading for Node.js targets
- Improved support for destructing in DefinePlugin
- Added VirtualUrlPlugin to support
virtual:
scheme
Performance Improvements
- Remove useless startup entrypoint runtime for ES modules output
- Cache
new URL(...)
evaluate expression
v5.99.9
Fixes
- HMR might fail if there are new initial chunks
- Destructuring namespace import with default
- Destructuring namespace import with computed-property
- Generate valid code for es export generation for multiple module entries
- Fixed public path issue for ES modules
- Asset modules work when lazy compilation used
- Eliminate unused statements in certain scenarios
- Fixed regression with location and order of dependencies
- Fixed typescript types
v5.99.8
Fixes
- Fixed type error with latest
@types/node
- Fixed typescript types
v5.99.7
Fixes
- Don't skip export generation for
default
reexport (#19463) - Fixed module library export generation for reexport (#19459)
- Avoid module concatenation in child compilation for module library (#19457)
- Ensure HMR recover gracefully when CSS module with error
- Respect
cause
of any errors anderrors
of AggregateError in stats output - Added missing
@types/json-schema
in types
v5.99.6
Fixes
- Respect public path for ES modules
- Fixed generation of module for
module
library when mixing commonjs and esm modules - Always apply
FlagDependencyExportsPlugin
for libraries where it required - Faster logic for dead control flow
- Typescript types
v5.99.5
Fixes
- Control dead flow for labeled and blockless statements
v5.99.4
Fixes
- Fixed terminated state for
if
/else
v5.99.3
Fixes
- Fixed dead control flow with deep nested
if
/else
v5.99.2
Fixes
- Dead control flow for exotic cases
v5.99.1
Fixes
- Dead control flow for many cases
v5.99.0
Fixes
- Fixed a lot of types
- Fixed runtime error when using asset module as entrypoint and runtimeChunk
- JSON generator now preserves
__proto__
property - Fixed when entry module isn't executed when targeting webworker with a runtime chunk
- Do not duplicate modules with import attributes and reexport
- The
module
andmodule
ESM libraries have been union and code generation has been improved - Use a valid output path for errored asset modules
- Remove BOM from JavaScript and CSS files when loader was not used
- Create export for externals for module/modern-module library
- Export unprovided variables for
commonjs-static
library - Forward semicolons from
meta.webpackAST
- Use
xxhash64
forcache.hashAlgorithm
whenexperiments.futureDefaults
enabled - [CSS] Fixed profiling plugin for CSS
- [CSS] Avoid extra module.export output for CSS module
Features
- Add dead control flow check
- Handle
new Worker(import.meta.url)
andnew Worker(new URL(import.meta.url))
syntax - Added ability to generate custom error content for generators
Performance Improvements
- Fixed excessive calls of getAllReferences
- Optimize loc for monomorphic inline caching
Chores
- Switch on
strict
types fortypescript
v5.98.0
Fixes
- Avoid the deprecation message #19062 by @alexander-akait
- Should not escape CSS local ident in JS #19060 by @JSerFeng
- MF parse range not compatible with Safari #19083 by @alexander-akait
- Preserve
filenameTemplate
in new split chunk #19104 by @henryqdineen - Use module IDs for final render order #19184 by @dmichon-msft
- Strip
blob:
protocol when public path isauto
#19199 by @alexander-akait - Respect
output.charset
everywhere #19202 by @alexander-akait - Node async WASM loader generation #19210 by @ashi009
- Correct
BuildInfo
andBuildMeta
type definitions #19200 by @inottn
Performance Improvements
- Improve
FlagDependencyExportsPlugin
for large JSON by depth #19058 by @hai-x - Optimize assign-depths #19193 by @dmichon-msft
- Use
startsWith
for matching instead of converting the string to a regex #19207 by @inottn
Chores
- Bump
nanoid
from 3.3.7 to 3.3.8 #19063 by @dependabot - Fixed incorrect typecast in
DefaultStatsFactoryPlugin
#19156 by @Andarist - Improved
readme.md
by adding video links for understanding webpack #19101 by @Vansh5632 - Typo fix #19205 by @hai-x
- Adopt the new webpack governance model #18804 by @ovflowd
Features
- Implement
/* webpackIgnore: true */
forrequire.resolve
#19201 by @alexander-akait
Continuous Integration
- CI fix #19196 by @alexander-akait
New Contributors
- @Andarist made their first contribution in https://github.com/webpack/webpack/pull/19156
- @Vansh5632 made their first contribution in https://github.com/webpack/webpack/pull/19101
- @ashi009 made their first contribution in https://github.com/webpack/webpack/pull/19210
- @ovflowd made their first contribution in https://github.com/webpack/webpack/pull/18804
Full Changelog: https://github.com/webpack/webpack/compare/v5.97.1...v5.98.0
v5.97.1
Bug Fixes
- Performance regression
- Sub define key should't be renamed when it's a defined variable
v5.97.0
Bug Fixes
- Don't crash with filesystem cache and unknown scheme
- Generate a valid code when
output.iife
istrue
and output.library.type isumd
- Fixed conflict variable name with concatenate modules and runtime code
- Merge duplicate chunks before
- Collisions in ESM library
- Use recursive search for versions of shared dependencies
- [WASM] Don't crash WebAssembly with Reference Types (sync and async)
- [WASM] Fixed wasm loading for sync and async webassembly
-
[CSS] Don't add
[uniqueName]
tolocalIdentName
when it is empty - [CSS] Parsing strings on Windows
- [CSS] Fixed CSS local escaping
New Features
- Added support for injecting debug IDs
- Export the
MergeDuplicateChunks
plugin - Added universal loading for JS chunks and JS worker chunks (only ES modules)
- [WASM] Added universal loading for WebAssembly chunks (only for async WebAssembly)
-
[CSS] Allow initial CSS chunks to be placed anywhere - the
output.cssHeadDataCompression
option was deleted - [CSS] Added universal loading for CSS chunks
-
[CSS] Parse ICSS
@value
at-rules in CSS modules -
[CSS] Parse ICSS
:import
rules in CSS modules -
[CSS] Added the
url
andimport
options for CSS - [CSS] Allow to import custom properties in CSS modules
Performance
- Faster Queue implementation, also fixed queue iterator state in dequeue method to ensure correct behavior after item removal
v5.96.1
Bug Fixes
-
[Types] Add
@types/eslint-scope
to dependencieS -
[Types] Fixed regression in
validate
v5.96.0
Bug Fixes
- Fixed Module Federation should track all referenced chunks
- Handle Data URI without base64 word
- HotUpdateChunk have correct runtime when modified with new runtime
- Order of chunks ids in generated chunk code
- No extra Javascript chunks when using asset module as an entrypoint
- Use optimistically logic for
output.environment.dynamicImport
to determine chunk format when no browserslist or target - Collision with global variables for
optimization.avoidEntryIife
- Avoid through variables in inlined module
- Allow chunk template strings in
output.devtoolNamespace
- No extra runtime for get javascript/css chunk filename
- No extra runtime for prefetch and preload in JS runtime when it was unsed in CSS
- Avoid cache invalidation using ProgressPlugin
- Increase parallelism when using
importModule
on the execution stage - Correctly parsing string in
export
andimport
- Typescript types
-
[CSS]
css/auto
considers a module depending on its filename ascss
(pure CSS) orcss/local
, before it wascss/global
andcss/local
- [CSS] Always interpolate classes even if they are not involved in export
- [CSS] No extra runtime in Javascript runtime chunks for asset modules used in CSS
- [CSS] No extra runtime in Javascript runtime chunks for external asset modules used in CSS
-
[CSS] No extra runtime for the
node
target -
[CSS] Fixed
url()
s and@import
parsing - [CSS] Fixed - emit a warning on broken :local and :global
New Features
- Export CSS and ESM runtime modules
- Single Runtime Chunk and Federation eager module hoisting
-
[CSS] Support
/* webpackIgnore: true */
for CSS files -
[CSS] Support
src()
support - [CSS] CSS nesting in CSS modules
v5.95.0
Bug Fixes
- Fixed hanging when attempting to read a symlink-like file that it can't read
- Handle
default
for import context element dependency - Merge duplicate chunks call after split chunks
- Generate correctly code for dynamically importing the same file twice and destructuring
- Use content hash as [base] and [name] for extracted DataURI's
- Distinguish
module
andimport
inmodule-import
for externalsimport
's - [Types] Make
EnvironmentPlugin
default values types less strict - [Types] Typescript 5.6 compatibility
New Features
- Add new
optimization.avoidEntryIife
option (true
by default for theproduction
mode) - Pass output.hash* options to loader context
Performance
- Avoid unneeded re-visit in build chunk graph
v5.94.0
Bug Fixes
- Added runtime condition for harmony reexport checked
- Handle properly
data
/http
/https
protocols in source maps - Make
bigint
optimistic when browserslist not found - Move @types/eslint-scope to dev deps
- Related in asset stats is now always an array when no related found
- Handle ASI for export declarations
- Mangle destruction incorrect with export named default properly
- Fixed unexpected asi generation with sequence expression
- Fixed a lot of types
New Features
- Added new external type "module-import"
- Support
webpackIgnore
fornew URL()
construction - [CSS]
@import
pathinfo support
Security
- Fixed DOM clobbering in auto public path
v5.93.0
Bug Fixes
- Generate correct relative path to runtime chunks
- Makes
DefinePlugin
quieter under default log level - Fixed mangle destructuring default in namespace import
- Fixed consumption of eager shared modules for module federation
- Strip slash for pretty regexp
- Calculate correct contenthash for CSS generator options
New Features
- Added the
binary
generator option for asset modules to explicitly keep source maps produced by loaders - Added the
modern-module
library value for tree shakable output - Added the
overrideStrict
option to override strict or non-strict mode for javascript modules
v5.92.1
Bug Fixes
- Doesn't crash with an error when the css experiment is enabled and contenthash is used
v5.92.0
Bug Fixes
- Correct tidle range's comutation for module federation
- Consider runtime for pure expression dependency update hash
- Return value in the
subtractRuntime
function for runtime logic - Fixed failed to resolve promise when eager import a dynamic cjs
- Avoid generation extra code for external modules when remapping is not required
- The
css/global
type now handles the exports name - Avoid hashing for
@keyframe
and@property
at-rules incss/global
type - Fixed mangle with destructuring for JSON modules
- The
stats.hasWarnings()
method now respects theignoreWarnings
option - Fixed
ArrayQueue
iterator - Correct behavior of
__webpack_exports_info__.a.b.canMangle
- Changed to the correct plugin name for the
CommonJsChunkFormatPlugin
plugin - Set the
chunkLoading
option to theimport
when environment is unknown and output is module - Fixed when runtimeChunk has no exports when
module
chunkFormat used - [CSS] Fixed parsing minimized CSS import
- [CSS] URLs in CSS files now have correct public path
- [CSS] The
css
module type should not allow parser to switch mode - [Types] Improved context module types
New Features
- Added platform target properties to compiler
- Improved multi compiler cache location and validating it
- Support
import attributes
spec (with
keyword) - Support
node:
prefix for Node.js core modules in runtime code - Support prefetch/preload for module chunk format
- Support "..." in the
importsFields
option for resolver - Root module is less prone to be wrapped in IIFE
- Export
InitFragment
class for plugins - Export
compileBooleanMatcher
util for plugins - Export
InputFileSystem
andOutputFileSystem
types - [CSS] Support the
esModule
generator option for CSS modules - [CSS] Support CSS when chunk format is module
v5.91.0
Bug Fixes
- Deserializer for ignored modules doesn't crash
- Allow the
unsafeCache
option to be a proxy object - Normalize the
snapshot.unmanagedPaths
option - Fixed
fs
types - Fixed resolve's plugins types
- Fixed wrongly calculate postOrderIndex
- Fixed watching types
- Output import attrbiutes/import assertions for external JS imports
- Throw an error when DllPlugin needs to generate multiple manifest files, but the path is the same
- [CSS] Output
layer
/supports
/media
for external CSS imports
New Features
- Allow to customize the stage of BannerPlugin
- [CSS] Support CSS exports convention
- [CSS] support CSS local ident name
- [CSS] Support
__webpack_nonce__
for CSS chunks - [CSS] Support
fetchPriority
for CSS chunks - [CSS] Allow to use LZW to compress css head meta (enabled in the
production
mode by default) - [CSS] Support prefetch/preload for CSS chunks
v5.90.3
Bug Fixes
- don't mangle when destructuring a reexport
- types for
Stats.toJson()
andStats.toString()
- many internal types
- [CSS] clean up export css local vars
Perf
- simplify and optimize chunk graph creation
v5.90.2
Bug Fixes
- use
Math.imul
infnv1a32
to avoid loss of precision, directly hash UTF16 values - the
setStatus()
of the HMR module should not return an array, which may cause infinite recursion -
__webpack_exports_info__.xxx.canMangle
shouldn't always same as default - mangle export with destructuring
- use new runtime to reconsider skipped connections
activeState
- make dynamic import optional in
try/catch
- improve auto publicPath detection
Dependencies & Maintenance
- improve CI setup and include Node.js@21
v5.90.1
Bug Fixes
- set
unmanagedPaths
in defaults - correct
preOrderIndex
andpostOrderIndex
- add fallback for MIME mismatch error in async wasm loading
- browsers versions of ECMA features
Performance
- optimize
compareStringsNumeric
- optimize
numberHash
using 32-bit FNV1a for small ranges, 64-bit for larger - reuse VM context across webpack magic comments
v5.90.0
Bug Fixes
- Fixed inner graph for classes
- Optimized
RemoveParentModulesPlugin
via bigint arithmetic - Fixed worklet detection in production mode
- Fixed an error for cyclic importModule
- Fixed types for
Server
andDirent
- Added the
fetchPriority
to hmr runtime'sensureChunk
function - Don't warn about dynamic import for build dependencies
- External module generation respects the
output.environment.arrowFunction
option - Fixed consumimng shared runtime module logic
- Fixed a runtime logic of multiple chunks
- Fixed destructing assignment of dynamic import json file
- Passing errors array for a module hash
- Added
/*#__PURE__*/
to generatedJSON.parse()
- Generated a library manifest after clean plugin
- Fixed non
amd
externals andamd
library - Fixed a bug in
SideEffectsFlagPlugin
with namespace re-exports - Fixed an error message for condition
or
- The
strictModuleErrorHandling
is now working - Clean up child compilation chunk graph to avoid memory leak
- [CSS] - Fixed CSS import prefer relative resolution
- [CSS] - Fixed CSS runtime chunk loading error message
New Features
- Allow to set
false
for dev server inwebpack.config.js
- Added a warning for async external when not supported
- Added a warning for async module when not supported
- Added the
node-module
option for thenode.__filename/__dirname
and enable it by default for ESM target - Added the
snapshot.unmanagedPaths
option - Exposed the
MultiCompilerOptions
type - [CSS] - Added CSS parser options to enable/disable named exports
- [CSS] - Moved CSS the
exportsOnly
option to CSS generator options
Dependencies & Maintenance
- use node.js LTS version for lint
- bump actions/cache from 3 to 4
- bump prettier from 3.2.1 to 3.2.3
- bump assemblyscript
- bump actions/checkout from 3 to 4
Full Changelog: https://github.com/webpack/webpack/compare/v5.89.0...v5.90.0
v5.89.0
New Features
- Make CommonJS import preserve chained expressions by @bworline in https://github.com/webpack/webpack/pull/17718
Dependencies & Maintenance
- chore(deps-dev): bump @types/node from 20.3.1 to 20.4.8 by @dependabot in https://github.com/webpack/webpack/pull/17568
- docs: add example for stats detailed output by @ersachin3112 in https://github.com/webpack/webpack/pull/17420
- docs: add example for stats normal output by @ersachin3112 in https://github.com/webpack/webpack/pull/17426
- chore(deps-dev): bump core-js from 3.31.0 to 3.32.0 by @dependabot in https://github.com/webpack/webpack/pull/17539
- chore(deps-dev): bump pretty-format from 29.5.0 to 29.6.2 by @dependabot in https://github.com/webpack/webpack/pull/17536
- chore(deps-dev): bump @types/node from 20.4.8 to 20.4.9 by @dependabot in https://github.com/webpack/webpack/pull/17583
- chore(deps-dev): bump less from 4.1.3 to 4.2.0 by @dependabot in https://github.com/webpack/webpack/pull/17580
- chore(deps): bump semver from 5.7.1 to 5.7.2 by @dependabot in https://github.com/webpack/webpack/pull/17483
- chore(deps-dev): bump simple-git from 3.19.0 to 3.19.1 by @dependabot in https://github.com/webpack/webpack/pull/17427
- chore(deps-dev): bump @types/node from 20.4.9 to 20.6.0 by @dependabot in https://github.com/webpack/webpack/pull/17666
Full Changelog: https://github.com/webpack/webpack/compare/v5.88.2...v5.89.0
v5.88.2
Bug Fixes
- Fixed a bug where unused identifiers should retain names when using css modules by @burhanuday in https://github.com/webpack/webpack/pull/17444
Full Changelog: https://github.com/webpack/webpack/compare/v5.88.1...v5.88.2
v5.88.1
Developer Experience
- Significantly improve TypeScript coverage for Library Plugins by @alexander-akait in https://github.com/webpack/webpack/pull/17414
Full Changelog: https://github.com/webpack/webpack/compare/v5.88.0...v5.88.1
v5.88.0
New Features
- [CSS] - Use
css/auto
as the default css mode by @burhanuday in https://github.com/webpack/webpack/pull/17399
Bug Fixes
- Fix bugs related to require.context and layer by @alexander-akait in https://github.com/webpack/webpack/pull/17388
- Fix bug in runtime for CSS loading by @alexander-akait in https://github.com/webpack/webpack/pull/17400
- Correct indirect call for tagged template expressions using correct this context by @alexander-akait in https://github.com/webpack/webpack/pull/17397
- Update environment support for KaiOS browser by @steverep in https://github.com/webpack/webpack/pull/17395
- Fix async module runtime code for running top-level-await by @ahabhgk in https://github.com/webpack/webpack/pull/17393
Developer Experience
- Add example for stats minimal output by @ersachin3112 in https://github.com/webpack/webpack/pull/17406
- Significantly improve type coverage for Dependency, Runtime, Template classes by @alexander-akait in https://github.com/webpack/webpack/pull/17394
Dependencies & Maintenance
- Bump browserslist from 4.21.8 to 4.21.9 by @dependabot in https://github.com/webpack/webpack/pull/17389
- Bump acorn from 8.8.2 to 8.9.0 by @dependabot in https://github.com/webpack/webpack/pull/17402
- Bump eslint from 8.42.0 to 8.43.0 by @dependabot in https://github.com/webpack/webpack/pull/17401
- Bump eslint-plugin-jest from 27.2.1 to 27.2.2 by @dependabot in https://github.com/webpack/webpack/pull/17407
New Contributors
- @steverep made their first contribution in https://github.com/webpack/webpack/pull/17395
Full Changelog: https://github.com/webpack/webpack/compare/v5.87.0...v5.88.0
v5.87.0
New Features
- Implement
fetchPriority
feature as parser option and magic comment by @alexander-akait in https://github.com/webpack/webpack/pull/17249 - [CSS] - Introduce 'css/auto' as a css module type by @ahabhgk in https://github.com/webpack/webpack/pull/16577
- [CSS] - Style-specific fields now automatically resolve in package.json by @burhanuday in https://github.com/webpack/webpack/pull/17346
- webpack configuration API now accepts "falsy values" loaders and plugins by @alexander-akait in https://github.com/webpack/webpack/pull/17339
Bug Fixes
- Fix codecov badge in readme by @burhanuday in https://github.com/webpack/webpack/pull/17353
Developer Experience
- Add link to svelte loader for webpack by @burhanuday in https://github.com/webpack/webpack/pull/17369
- Increase parser API types in internal plugins across dependency plugins @alexander-akait in https://github.com/webpack/webpack/pull/17365
Dependencies & Maintenance
- Bump memfs from 3.5.2 to 3.5.3 by @dependabot in https://github.com/webpack/webpack/pull/17347
- Bump webpack-cli from 5.1.3 to 5.1.4 by @dependabot in https://github.com/webpack/webpack/pull/17349
- Bump es-module-lexer from 1.2.1 to 1.3.0 by @dependabot in https://github.com/webpack/webpack/pull/17362
- Bump @types/node from 20.2.5 to 20.3.0 by @dependabot in https://github.com/webpack/webpack/pull/17361
- Bump core-js from 3.30.2 to 3.31.0 by @dependabot in https://github.com/webpack/webpack/pull/17360
- Bump browserslist from 4.21.6 to 4.21.8 by @dependabot in https://github.com/webpack/webpack/pull/17367
- Bump @types/node from 20.3.0 to 20.3.1 by @dependabot in https://github.com/webpack/webpack/pull/17366
New Contributors
@aboktor made their first contribution in #16991 #16989 @silverwind made their first contribution in #17339 via #17329
Full Changelog: https://github.com/webpack/webpack/compare/v5.86.0...v5.87.0
v5.86.0
New Features
- Improved cache size performance via better handling of serialization for errors and bigints by @alexander-akait in https://github.com/webpack/webpack/pull/17282
- Introduce an export default handler function option for
ProgressPlugin
by @alexander-akait in https://github.com/webpack/webpack/pull/17312 - Support passing
RegExp
tosplitChunks.chunks
by @hyf0 in https://github.com/webpack/webpack/pull/17332
Bug Fixes
- Fix layer capabilities for
ContextModule
types by @huozhi in https://github.com/webpack/webpack/pull/17310 - Fix compatibility of
__non_webpack_require__
with ES modules by @alexander-akait in https://github.com/webpack/webpack/pull/17308 - Improve type coverage
Chunk
,ChunkGroup
, and other plugins by @alexander-akait in https://github.com/webpack/webpack/pull/1731 - Do not add
js
extension for eval source maps when extension is not resolvable by @alexander-akait in https://github.com/webpack/webpack/pull/17331
Developer Experience
- Improve type coverage for Json Module type and lazy load json-assertions package by @alexander-akait in https://github.com/webpack/webpack/pull/17301
Dependencies & Maintenance
- Bump memfs from 3.5.1 to 3.5.2 by @dependabot in https://github.com/webpack/webpack/pull/17315
- Bump webpack-cli from 5.1.1 to 5.1.3 by @dependabot in https://github.com/webpack/webpack/pull/17314
- Bump eslint from 8.41.0 to 8.42.0 by @dependabot in https://github.com/webpack/webpack/pull/17313
New Contributors
- @huozhi made their first contribution in https://github.com/webpack/webpack/pull/17310
- @hyf0 made their first contribution in https://github.com/webpack/webpack/pull/17332
Full Changelog: https://github.com/webpack/webpack/compare/v5.85.1...v5.86.0
v5.85.1
Bug Fixes
- Fix bug in handling barrel imports (#17305) by @bworline in https://github.com/webpack/webpack/pull/17307 - NOTE: An internal API
BasicEvaluatedExpression.getMemberRangeStarts
has been changed toBasicEvaluatedExpression.getMemberRanges
, please see type definition changes and the pull request for more information.
Dependencies & Maintenance
- Bump @types/jest from 29.5.1 to 29.5.2 by @dependabot in https://github.com/webpack/webpack/pull/17297
Full Changelog: https://github.com/webpack/webpack/compare/v5.85.0...v5.85.1
v5.85.0
New Features
- Add
readonly
cache mode by @vankop in https://github.com/webpack/webpack/pull/15470 - Normalize property accessors for esm namespaces and chained member/call expressions by @bworline in https://github.com/webpack/webpack/pull/17203
- Support
environment
in loader context by @alexander-akait in https://github.com/webpack/webpack/pull/17281 - Introduce a new syntax for
addModule()
support in worklets -*context.audioWorklet.addModule()
by @alexander-akait in https://github.com/webpack/webpack/pull/17212
Bug Fixes
- Fix type regression with unknown module type strings by @alexander-akait in https://github.com/webpack/webpack/pull/17266
Developer Experience
- Use global runtime constants for webpack exports by @burhanuday in https://github.com/webpack/webpack/pull/17270
- Add strict mode type coverage for WASM and Runtime code by @alexander-akait in https://github.com/webpack/webpack/pull/17267
- Add strict mode type coverage for runtime modules and runtime plugins by @alexander-akait in https://github.com/webpack/webpack/pull/17261
- Add types for JSON & Asset Modules including their interfacing plugins by @alexander-akait in https://github.com/webpack/webpack/pull/17262
- Add type coverage for Module subclasses and plugins by @alexander-akait in https://github.com/webpack/webpack/pull/17272
Dependencies & Maintenance
- Use GitHub Discussions instead of Gitter in issue templates by @snitin315 in https://github.com/webpack/webpack/pull/17293
- Bump @types/node from 20.2.3 to 20.2.4 by @dependabot in https://github.com/webpack/webpack/pull/17269
- Bump browserslist from 4.21.5 to 4.21.6 by @dependabot in https://github.com/webpack/webpack/pull/17275
- Bump @types/node from 20.2.4 to 20.2.5 by @dependabot in https://github.com/webpack/webpack/pull/17276
- Bump @babel/core from 7.21.8 to 7.22.1 by @dependabot in https://github.com/webpack/webpack/pull/17278
Full Changelog: https://github.com/webpack/webpack/compare/v5.84.1...v5.85.0
v5.84.1
Bug Fixes
- Fix regression in inner graph for reserved identifiers by @alexander-akait in https://github.com/webpack/webpack/pull/17265
Dependencies & Maintenance
- Bump @types/jest from 29.5.0 to 29.5.1 by @dependabot in https://github.com/webpack/webpack/pull/17027
- Bump simple-git from 3.18.0 to 3.19.0 by @dependabot in https://github.com/webpack/webpack/pull/17263
Full Changelog: https://github.com/webpack/webpack/compare/v5.84.0...v5.84.1
v5.84.0
New Features
- SourceMapDevToolPlugin now supports
append
option as a function by @snitin315 in https://github.com/webpack/webpack/pull/17252
Bug Fixes
- Fix multiple bugs referencing class names when shadowed by import name in properties and methods by @alexander-akait in https://github.com/webpack/webpack/pull/17233
- Allow DefinePlugin shorthand property by @shamoilarsi in https://github.com/webpack/webpack/pull/17231
- [CSS] - Fix edge cases in parsing
@import
by @alexander-akait in https://github.com/webpack/webpack/pull/17229
Developer Experience
- Increase type coverage for serialization classes by @alexander-akait in https://github.com/webpack/webpack/pull/17243
- Increase type coverage for
JavascriptParser
andModuleDependency
subclasses by @alexander-akait in https://github.com/webpack/webpack/pull/17236 - Increase type coverage to
strict
-mode quality for Configuration/Normalization objects by @alexander-akait in https://github.com/webpack/webpack/pull/17247 - Refactor duplicate strings by replacing them with constant for webpack_require instead of string literal by @burhanuday in https://github.com/webpack/webpack/pull/17228
- Add test case for
with { type: "json" }
by @alexander-akait in https://github.com/webpack/webpack/pull/17230 - Add test case for destructuring by @alexander-akait in https://github.com/webpack/webpack/pull/17248
Dependencies & Maintenance
- Add GitHub discussions badge in README by @snitin315 in https://github.com/webpack/webpack/pull/17251
- Bump enhanced-resolve to 5.14.1 by @TheLarkInn in https://github.com/webpack/webpack/pull/17257
- Bump @types/node from 20.1.7 to 20.2.0 by @dependabot in https://github.com/webpack/webpack/pull/17219
- Bump @types/node from 20.2.0 to 20.2.1 by @dependabot in https://github.com/webpack/webpack/pull/17226
- Bump webpack-cli from 5.1.0 to 5.1.1 by @dependabot in https://github.com/webpack/webpack/pull/17164
- Bump eslint from 8.39.0 to 8.40.0 by @dependabot in https://github.com/webpack/webpack/pull/17148
- Bump @babel/core from 7.21.4 to 7.21.8 by @dependabot in https://github.com/webpack/webpack/pull/17126
- Bump @types/node from 20.2.1 to 20.2.3 by @dependabot in https://github.com/webpack/webpack/pull/17238
- Bump eslint from 8.40.0 to 8.41.0 by @dependabot in https://github.com/webpack/webpack/pull/17237
New Contributors
- @shamoilarsi made their first contribution in https://github.com/webpack/webpack/pull/17231
Full Changelog: https://github.com/webpack/webpack/compare/v5.83.1...v5.84.0
v5.83.1
Bug Fixes
- Fix regression in import/export normailization effecting mini-css-extract-plugin by @alexander-akait in https://github.com/webpack/webpack/pull/17214
Full Changelog: https://github.com/webpack/webpack/compare/v5.83.0...v5.83.1
v5.83.0
New Features
- Normalize property access for imports and exports by @bworline in https://github.com/webpack/webpack/pull/17137
- Top Level Await is now enabled by default by @burhanuday in https://github.com/webpack/webpack/pull/17192
Bug Fixes
- Correct
chunkgroup.groupsIterable
return type by @TheLarkInn in https://github.com/webpack/webpack/pull/17196 - Fix bug in Rule Matcher type by @alexander-akait in https://github.com/webpack/webpack/pull/17207
- Fixed apply event callback and optimizing callback event type by @nuintun in https://github.com/webpack/webpack/pull/16094
- Fix types in hot module replacement APIs by @alexander-akait in https://github.com/webpack/webpack/pull/17193
Developer Experience
- Expose
ChunkGroup
to type definitions by @TheLarkInn in https://github.com/webpack/webpack/pull/17201 - Add
NormalModuleFactory
'sResolveData
type to public interface by @TheLarkInn in https://github.com/webpack/webpack/pull/17195 - Document
compilation.afterChunks
hook by @TheLarkInn in https://github.com/webpack/webpack/pull/17202
Dependencies & Maintenance
- Bump @webassemblyjs/wasm-edit from 1.11.5 to 1.11.6 by @dependabot in https://github.com/webpack/webpack/pull/17168
- Bump wast-loader from 1.11.5 to 1.11.6 by @dependabot in https://github.com/webpack/webpack/pull/17163
- Bump yarn-deduplicate from 6.0.1 to 6.0.2 by @dependabot in https://github.com/webpack/webpack/pull/17184
- Fix command by @alexander-akait in https://github.com/webpack/webpack/pull/17154
- Bump @types/node from 18.16.3 to 20.1.7 by @dependabot in https://github.com/webpack/webpack/pull/17205
New Contributors
- @bworline made their first contribution in https://github.com/webpack/webpack/pull/17137
- @nuintun made their first contribution in https://github.com/webpack/webpack/pull/16094
Full Changelog: https://github.com/webpack/webpack/compare/v5.82.1...v5.83.0
v5.82.1
Bug Fixes
- [CSS] - Support nesting in CSS modules and bug fixes by @alexander-akait in https://github.com/webpack/webpack/pull/17133
- [CSS] - Fix crash with
importModule
when CSS enabled by @alexander-akait in https://github.com/webpack/webpack/pull/17140 - Fix bug where
output.hashFunction
was failing to generate debug hash by @ahabhgk in https://github.com/webpack/webpack/pull/16950 - Reduce the amount of generated code for chunk loading by @lvivski in https://github.com/webpack/webpack/pull/17151
- Use module preload for ESM module output by @alexander-akait in https://github.com/webpack/webpack/pull/17143
Developer Experience
- Improve module type strictness for Module.prototype.type expand ModuleTypeConstants by @TheLarkInn in https://github.com/webpack/webpack/pull/17136
Dependencies & Maintenance
- Update package.json description by @JeraldVin in https://github.com/webpack/webpack/pull/17145
- Bump webpack-cli from 5.0.2 to 5.1.0 by @dependabot in https://github.com/webpack/webpack/pull/17146
- Bump core-js from 3.30.1 to 3.30.2 by @dependabot in https://github.com/webpack/webpack/pull/17149
- Bump enhanced-resolve to v5.14.0 by @snitin315 in https://github.com/webpack/webpack/pull/17160
New Contributors
- @JeraldVin made their first contribution in https://github.com/webpack/webpack/pull/17145
Full Changelog: https://github.com/webpack/webpack/compare/v5.82.0...v5.82.1
v5.82.0
New Features
- [CSS] - Add URL dependencies support to consume shared module via module federation by @snitin315 in https://github.com/webpack/webpack/pull/16945
- Allow webpack-cli to be in ESM by @alexander-akait in https://github.com/webpack/webpack/pull/17088
- Allow specifying "onPolicyCreationFailure" mode for trusted types by @Zlatkovsky in https://github.com/webpack/webpack/pull/16990
Bug Fixes
- [CSS] - Respect
media
/supports
/layer
from parent CSS module by @alexander-akait in https://github.com/webpack/webpack/pull/17115 - [CSS] - Add warning & support for any @import rules must precede all other rules by @alexander-akait in https://github.com/webpack/webpack/pull/17118
- [CSS] - Support handling
#hash
URL as external (similar to Parcel) by @alexander-akait in https://github.com/webpack/webpack/pull/17116 - Optimize numberHash.js performance by removing inner loops by @alexkuz in https://github.com/webpack/webpack/pull/17074
- Improve template string comparison algorithm by @An0nie in https://github.com/webpack/webpack/pull/17079
Tests & Contributor Experience
- [CSS] - Increase imports external test coverage by @alexander-akait in https://github.com/webpack/webpack/pull/17089
- Improve MR reliability via ignoring unstable coverage by @alexander-akait in https://github.com/webpack/webpack/pull/17106
- Update webpack types to support extends property in webpack (for webpack-cli) by @burhanuday in https://github.com/webpack/webpack/pull/17113
Developer Experience
- Increase type coverage and documentation for
StringXor
class. by @TheLarkInn in https://github.com/webpack/webpack/pull/17070 - Increase type coverage & docs for
numberHash
by @TheLarkInn in https://github.com/webpack/webpack/pull/17072 - Increase type coverage & docs for
JavascriptParser
by @TheLarkInn in https://github.com/webpack/webpack/pull/17094 - Increase type coverage & docs for
BasicEvaluatedExpression
by @TheLarkInn in https://github.com/webpack/webpack/pull/17096 - Increase type coverage for CSS module type by @alexander-akait in https://github.com/webpack/webpack/pull/17097
- Increase type coverage for JSON module type by @alexander-akait in https://github.com/webpack/webpack/pull/17095
- Increase type coverage & docs for multiple utility classes by @alexander-akait in https://github.com/webpack/webpack/pull/17107
Dependencies & Maintenance
- chore(deps-dev): bump lint-staged from 13.2.1 to 13.2.2 by @dependabot in https://github.com/webpack/webpack/pull/17075
- chore(deps-dev): bump eslint from 8.38.0 to 8.39.0 by @dependabot in https://github.com/webpack/webpack/pull/17052
- chore(deps-dev): bump assemblyscript from 0.27.3 to 0.27.4 by @dependabot in https://github.com/webpack/webpack/pull/17064
- chore(deps-dev): bump assemblyscript from 0.27.4 to 0.27.5 by @dependabot in https://github.com/webpack/webpack/pull/17109
- chore(deps-dev): bump @types/node from 18.16.2 to 18.16.3 by @dependabot in https://github.com/webpack/webpack/pull/17112
- chore(deps-dev): bump @types/node from 18.15.13 to 18.16.2 by @dependabot in https://github.com/webpack/webpack/pull/17084
- chore(deps-dev): bump webpack-cli from 5.0.1 to 5.0.2 by @dependabot in https://github.com/webpack/webpack/pull/17054
- chore(deps-dev): bump date-fns from 2.29.3 to 2.30.0 by @dependabot in https://github.com/webpack/webpack/pull/17111
New Contributors
- @An0nie made their first contribution in https://github.com/webpack/webpack/pull/17079
- @burhanuday made their first contribution in https://github.com/webpack/webpack/pull/17113
- @Zlatkovsky made their first contribution in https://github.com/webpack/webpack/pull/16990
Full Changelog: https://github.com/webpack/webpack/compare/v5.81.0...v5.82.0
v5.81.0
New Features
- [CSS] - Increased CSS import support and new hooks included for CSS module creation by @alexander-akait in https://github.com/webpack/webpack/pull/17057
- Logging now added to DefinePlugin by @alexander-akait in https://github.com/webpack/webpack/pull/17048
- New
ignoreBrowserWarnings
option to ignore browser console warnings in ModuleFederation by @indeediansbrett in https://github.com/webpack/webpack/pull/16388
Bug Fixes
- [CSS] - Fix issue where vendor prefixed keyframes and animation was not supported in CSS modules by @alexander-akait in https://github.com/webpack/webpack/pull/16975
- Fix bug where AST was not properly handled by @quanru in https://github.com/webpack/webpack/pull/17032
- Fix automatic publicPath detection logic by @alexander-akait in https://github.com/webpack/webpack/pull/17047
Tests & Contributor Experience
- Rename
provide
togetOrInsert
in MapHelpers and document it better by @TheLarkInn in https://github.com/webpack/webpack/pull/17060 - Increase test reliability for DefinePlugin @alexander-akait in https://github.com/webpack/webpack/pull/17062
- Add additional CI Pipeline to test main branches of first-party webpack dependencies by @alexander-akait in https://github.com/webpack/webpack/pull/17020
- Refactor tests to no longer use deprecated or legacy dependencies and APIs by @alexander-akait in https://github.com/webpack/webpack/pull/17033
Developer Experience
- Increase type coverage/documentation for ModuleFilenameHelpers by @TheLarkInn in https://github.com/webpack/webpack/pull/17045
- Increase type coverage/documentation for CommonJsExportsParserPlugin by @TheLarkInn in https://github.com/webpack/webpack/pull/17046
- Increase type coverage/documentation for binarySearchBounds.js by @TheLarkInn in https://github.com/webpack/webpack/pull/17058
- Export MemoryCacheOptions types by @romulof in https://github.com/webpack/webpack/pull/17055
Dependencies & Maintenance
- Add NodeJS v20 to CI Matrix by @alexander-akait in https://github.com/webpack/webpack/pull/17019
- Update Typescript to v5 by @alexander-akait in https://github.com/webpack/webpack/pull/16957
- Bump @types/estree from 1.0.0 to 1.0.1 by @dependabot in https://github.com/webpack/webpack/pull/17026
- Bump @types/node from 18.15.11 to 18.15.13 by @dependabot in https://github.com/webpack/webpack/pull/17038
- Bump assemblyscript from 0.27.2 to 0.27.3 by @dependabot in https://github.com/webpack/webpack/pull/17051
- Bump memfs from 3.5.0 to 3.5.1 by @dependabot in https://github.com/webpack/webpack/pull/17039
- Bump prettier from 2.8.7 to 2.8.8 by @dependabot in https://github.com/webpack/webpack/pull/17050
- Bump simple-git from 3.17.0 to 3.18.0 by @dependabot in https://github.com/webpack/webpack/pull/17066
New Contributors
- @quanru made their first contribution in https://github.com/webpack/webpack/pull/17032
- @romulof made their first contribution in https://github.com/webpack/webpack/pull/17055
- @indeediansbrett made their first contribution in https://github.com/webpack/webpack/pull/16388
Full Changelog: https://github.com/webpack/webpack/compare/v5.80.0...v5.81.0
v5.80.0
New Features
- Support destructuring assignment in
import.meta
by @vankop in https://github.com/webpack/webpack/pull/16996 - Support treeshaking for destructuring assignment with
AwaitExpression
by @vankop in https://github.com/webpack/webpack/pull/16995 - Introduce
errorsSpace
,warningsSpace
for more readable traces in stats by @vankop in https://github.com/webpack/webpack/pull/15450
Bug Fixes
- [CSS] - Fix runtime generation bug for merged CSS Chunks by @janlent1 in https://github.com/webpack/webpack/pull/16903
- [CSS] - Properly handle
url()
/src()
/image-set()
/image()
by @alexander-akait in https://github.com/webpack/webpack/pull/16978 - ES Module webpack loaders are now supported @stefanprobst in https://github.com/webpack/webpack/pull/15198
- Fix spelling error for
statement.finalizer
in parser by @xiaoboost in https://github.com/webpack/webpack/pull/17016 - Fix non-deterministic
moduleId
assignment due to encounteringNaN
in sort function by @scameron in https://github.com/webpack/webpack/pull/16933 - [enhanced-resolve]: Support wildcards pattern with common suffix in package maps & imports/exports field by @bvanjoi in https://github.com/webpack/enhanced-resolve/pull/353
Tests & Contributor Experience
- [CSS] - Added test case for
@supports
field by @alexander-akait in https://github.com/webpack/webpack/pull/17011 - Add test for include option in
BannerPlugin
by @jeffin143 in https://github.com/webpack/webpack/pull/10736 - Remove
finializer
from cspell.json by @snitin315 in https://github.com/webpack/webpack/pull/17022
Developer Experience
- Adds the twitter badge by @yadunandanbhat in https://github.com/webpack/webpack/pull/15667
- Add
wasm-bindgen
example toexample
by @gthb in https://github.com/webpack/webpack/pull/14313 - Update grammar mistakes in examples by @ersachin3112 in https://github.com/webpack/webpack/pull/16988
Dependencies & Maintenance
- Bump core-js from 3.30.0 to 3.30.1 by @dependabot in https://github.com/webpack/webpack/pull/16983
- Bump
@webassemblyjs
by @alexander-akait in https://github.com/webpack/webpack/pull/17003 - Bump assemblyscript from 0.25.2 to 0.27.2 by @dependabot in https://github.com/webpack/webpack/pull/16959
- Bump enhanced-resolve to 5.13.0 by @TheLarkInn in https://github.com/webpack/webpack/pull/17024
- Included githubactions in the dependabot config by @neilnaveen in https://github.com/webpack/webpack/pull/15618
- Fix prettier by @alexander-akait in https://github.com/webpack/webpack/pull/16976
New Contributors
- @neilnaveen made their first contribution in https://github.com/webpack/webpack/pull/15618
- @yadunandanbhat made their first contribution in https://github.com/webpack/webpack/pull/15667
- @ersachin3112 made their first contribution in https://github.com/webpack/webpack/pull/16988
- @stefanprobst made their first contribution in https://github.com/webpack/webpack/pull/15198
- @xiaoboost made their first contribution in https://github.com/webpack/webpack/pull/17016
- @scameron made their first contribution in https://github.com/webpack/webpack/pull/16933
Full Changelog: https://github.com/webpack/webpack/compare/v5.79.0...v5.80.0
v5.79.0
New Features
- webpack will now support simple destructuring scenarios for treeshaking namespaced imports and
DefinePlugin
by @vankop in https://github.com/webpack/webpack/pull/16941
Bugfixes
- Truncate extremely long module names in
DefaultStatsPrinter
by @snitin315 in https://github.com/webpack/webpack/pull/16882 - Add
[contenthash]
template support inDllPlugin
'sname
option by @snitin315 in https://github.com/webpack/webpack/pull/16935 - Fixed a bug where
readRecords
compiler hook was causing hangs in conjunction with theReadRecordsPlugin
by @snitin315 & @zookatron in https://github.com/webpack/webpack/pull/16944 - webpack can now consume ESM bundles generated by webpack's esm output support by @vankop in https://github.com/webpack/webpack/pull/15608
- [CSS] - webpack now respects CSS's case-insensitivity with atTags like
@MEDIA
by @alexander-akait in https://github.com/webpack/webpack/pull/16915 - [CSS] - Fixes a bug where crossOriginLoading anonymous would not work when loading styles by @chenjiahan in https://github.com/webpack/webpack/pull/16925
Developer Experience
- Fix broken links and typos found in examples by @snitin315 in https://github.com/webpack/webpack/pull/16937
- Export more
Externals
Option types by @snitin315 in https://github.com/webpack/webpack/pull/12774
Contributor Experience
- Add new test case for ModuleFederationPlugin usage with
shareScope
option by @snitin315 in https://github.com/webpack/webpack/pull/16943 - Bump core-js from 3.20.3 to 3.30.0 by @dependabot in https://github.com/webpack/webpack/pull/16905
- Update all applicable local dependencies and devDependencies by @alexander-akait in https://github.com/webpack/webpack/pull/16919, https://github.com/webpack/webpack/pull/16924, https://github.com/webpack/webpack/pull/16936, https://github.com/webpack/webpack/pull/16968
- Update to Jest 29 by @alexander-akait in https://github.com/webpack/webpack/pull/16947
New Contributors
- @chenjiahan made their first contribution in https://github.com/webpack/webpack/pull/16925
- @karlhorky made their first contribution in https://github.com/webpack/webpack/pull/16419
- @zookatron made their first contribution in https://github.com/webpack/webpack/pull/16301
Full Changelog: https://github.com/webpack/webpack/compare/v5.78.0...v5.79.0
v5.78.0
Features
- Implement
amdContainer
support for AMD libraries (Fixes #16561) by @long76 in https://github.com/webpack/webpack/pull/16562
Bugfixes
- [CSS] - Nested atRule's
@media
or@supports
now properly are replaced with unique identifiers by @noreiller in https://github.com/webpack/webpack/pull/15812 - [CSS] - Fix bug where closing parenthesis in CSS were not properly parsed and compiled by @janlent1 in https://github.com/webpack/webpack/pull/16864
- Fix an issue where
oneOf
rule has been picked multiple times by @xiaoxiaojx in https://github.com/webpack/webpack/pull/16477 - Add
createRequire
support fornode:module
prefix by @alexander-akait in https://github.com/webpack/webpack/pull/16904 - Fix bug where self-referencing a package in a shared module failed by @weareoutman in https://github.com/webpack/webpack/pull/16685
Performance
- Make
ErrorHelpers
named functions; Add types by @TheLarkInn in https://github.com/webpack/webpack/pull/16893 - Introduce
ModuleTypeConstants
for plugins by @TheLarkInn in https://github.com/webpack/webpack/pull/16896 - Refactor memory footprint in string usages for multiple plugins by @TheLarkInn in https://github.com/webpack/webpack/pull/16894
- Add more module type constants, use them across codebase by @TheLarkInn in https://github.com/webpack/webpack/pull/16898
Contributor Experience
- Implement default MR Template to use GitHub Copilot for MR's integration and fix template name usage by @geromegrignon in https://github.com/webpack/webpack/pull/16890
- ci: update actions/cache to v3 by @armujahid in https://github.com/webpack/webpack/pull/16462
- webpack org Collaborators and Members now have funded GitHub Codespaces!
New Contributors
- @geromegrignon made their first contribution in https://github.com/webpack/webpack/pull/16890
- @armujahid made their first contribution in https://github.com/webpack/webpack/pull/16462
- @long76 made their first contribution in https://github.com/webpack/webpack/pull/16562
- @weareoutman made their first contribution in https://github.com/webpack/webpack/pull/16685
Full Changelog: https://github.com/webpack/webpack/compare/v5.77.0...v5.78.0
v5.77.0
New Features
- Add a new output option,
output.workerPublicPath
by @thomastay in https://github.com/webpack/webpack/pull/16671
Developer Experience
- Improve
resolve.extensions
error message to suggest when"."
is missing before the extension by @snitin315 in https://github.com/webpack/webpack/pull/16807
Contributor Experience
- Enable GitHub Copilot for MR's into default Merge Request Template by @TheLarkInn in https://github.com/webpack/webpack/pull/16881
New Contributors
- @thomastay made their first contribution in https://github.com/webpack/webpack/pull/16671
Full Changelog: https://github.com/webpack/webpack/compare/v5.76.3...v5.77.0
v5.76.3
Bugfixes
- Non-javascript files will correctly not be imported when using
experiments.outputModule
(ES Module Output) by @snitin315 in https://github.com/webpack/webpack/pull/16809 - Limit console output progress bar length to 40 when no columns provided by @snitin315 in https://github.com/webpack/webpack/pull/16810
- Add missing NodeJS Builtin Modules support for
inspector/promises
,readline/promises
, andstream/consumers
by @ShenHongFei in https://github.com/webpack/webpack/pull/16841 - webpack bin/cli now properly respects
NODE_PATH
env variable by @snitin315 in https://github.com/webpack/webpack/pull/16808 - Improve typos in
resolveResourceErrorHints
by @snitin315 in https://github.com/webpack/webpack/pull/16806 - Add missing
loaders
token support tomoduleFilenameTemplate
function call by @pgoldberg in https://github.com/webpack/webpack/pull/16756 - Add gaurd condition for
enabledLibraryTypes
in internalContainerPlugin
by @PengBoUESTC in https://github.com/webpack/webpack/pull/16635
New Contributors
- @ShenHongFei made their first contribution in https://github.com/webpack/webpack/pull/16841
- @pgoldberg made their first contribution in https://github.com/webpack/webpack/pull/16756
- @PengBoUESTC made their first contribution in https://github.com/webpack/webpack/pull/16635
Full Changelog: https://github.com/webpack/webpack/compare/v5.76.2...v5.76.3
v5.76.2
Bugfixes
- Fix bug where a missing semicolon in generated bundle output for
publicPathRuntime
would cause concatenated runtime errors by @snitin315 in https://github.com/webpack/webpack/pull/16811 - Remove redundant semicolons generated in bundle runtime code after
onScriptComplete
function by @ahaoboy in https://github.com/webpack/webpack/pull/16347 - Fix bug where
RealContentHashPlugin
was not respectingoutput.hashSalt
's ability to cause a force recalculation of[contenthash]
for emitted assets by @dmichon-msft #16789
Performance
- Improve memory and runtime performance of sourcemaps via hoisting Regular Expression literals to stored variables by @TheLarkInn in https://github.com/webpack/webpack/pull/15722
- Correct v8 deoptimization in
ModuleGraph
due to instance property declarations occurring outside of constructor by @snitin315 in https://github.com/webpack/webpack/pull/16830
Developer Experience
- Improved internal typings to match
webpack-sources
typings forSource
instances by @snitin315 in https://github.com/webpack/webpack/pull/16805 - Update repo examples to include missing quotation by @snitin315 in https://github.com/webpack/webpack/pull/16812
New Contributors
- @ahaoboy made their first contribution in https://github.com/webpack/webpack/pull/16347
Full Changelog: https://github.com/webpack/webpack/compare/v5.76.1...v5.76.2
v5.76.1
Fixed
- Added
assert/strict
built-in toNodeTargetPlugin
Revert
- Improve performance of
hashRegExp
lookup by @ryanwilsonperkin in https://github.com/webpack/webpack/pull/16759
v5.76.0
Bugfixes
- Avoid cross-realm object access by @Jack-Works in https://github.com/webpack/webpack/pull/16500
- Improve hash performance via conditional initialization by @lvivski in https://github.com/webpack/webpack/pull/16491
- Serialize
generatedCode
info to fix bug in asset module cache restoration by @ryanwilsonperkin in https://github.com/webpack/webpack/pull/16703 - Improve performance of
hashRegExp
lookup by @ryanwilsonperkin in https://github.com/webpack/webpack/pull/16759
Features
- add
target
toLoaderContext
type by @askoufis in https://github.com/webpack/webpack/pull/16781
Security
Repo Changes
- Fix HTML5 logo in README by @jakebailey in https://github.com/webpack/webpack/pull/16614
- Replace TypeScript logo in README by @jakebailey in https://github.com/webpack/webpack/pull/16613
- Update actions/cache dependencies by @piwysocki in https://github.com/webpack/webpack/pull/16493
New Contributors
- @Jack-Works made their first contribution in https://github.com/webpack/webpack/pull/16500
- @lvivski made their first contribution in https://github.com/webpack/webpack/pull/16491
- @jakebailey made their first contribution in https://github.com/webpack/webpack/pull/16614
- @akhilgkrishnan made their first contribution in https://github.com/webpack/webpack/pull/16446
- @ryanwilsonperkin made their first contribution in https://github.com/webpack/webpack/pull/16703
- @piwysocki made their first contribution in https://github.com/webpack/webpack/pull/16493
- @askoufis made their first contribution in https://github.com/webpack/webpack/pull/16781
Full Changelog: https://github.com/webpack/webpack/compare/v5.75.0...v5.76.0
v5.75.0
Bugfixes
-
experiments.*
normalize tofalse
when opt-out - avoid
NaN%
- show the correct error when using a conflicting chunk name in code
- HMR code tests existance of
window
before trying to access it - fix
eval-nosources-*
actually exclude sources - fix race condition where no module is returned from processing module
- fix position of standalong semicolon in runtime code
Features
- add support for
@import
to extenal CSS when using experimental CSS in node - add
i64
support to the deprecated WASM implementation
Developer Experience
- expose
EnableWasmLoadingPlugin
- add more typings
- generate getters instead of readonly properties in typings to allow overriding them
v5.74.0
Features
- add
resolve.extensionAlias
option which allows to alias extensions- This is useful when you are forced to add the
.js
extension to imports when the file really has a.ts
extension (typescript +"type": "module"
)
- This is useful when you are forced to add the
- add support for ES2022 features like static blocks
- add Tree Shaking support for
ProvidePlugin
Bugfixes
- fix persistent cache when some build dependencies are on a different windows drive
- make order of evaluation of side-effect-free modules deterministic between concatenated and non-concatenated modules
- remove left-over from debugging in TLA/async modules runtime code
- remove unneeded extra 1s timestamp offset during watching when files are actually untouched
- This sometimes caused an additional second build which are not really needed
- fix
shareScope
option forModuleFederationPlugin
- set
"use-credentials"
also for same origin scripts
Performance
- Improve memory usage and performance of aggregating needed files/directories for watching
- This affects rebuild performance
Extensibility
- export
HarmonyImportDependency
for plugins
v5.73.0
Features
- add options for default
dynamicImportMode
and prefetch and preload - add support for
import { createRequire } from "module"
in source code
Bugfixes
- fix code generation of e. g.
return"field"in Module
- fix performance of large JSON modules
- fix performance of async modules evaluation
Developer Experience
- export
PathData
in typings - improve error messages with more details
v5.72.1
Bugfixes
- fix
__webpack_nonce__
with HMR - fix
in
operator in some cases - fix json parsing error messages
- fix module concatenation with using
this.importModule
- upgrade enhanced-resolve
v5.72.0
Features
- make cache warnings caused by build errors less verbose
- Allow banner to be placed as a footer with the BannerPlugin
- allow to concatenate asset modules
Bugfixes
- fix RemoteModules when using HMR (Module Federation + HMR)
- throw error when using module concatenation and cacheUnaffected
- fix
in
operator with nested exports
v5.71.0
Features
- choose smarter default for
uniqueName
when using aoutput.library
which includes placeholders - add support for expressions with
in
of a imported binding - generate UMD code with arrow functions when possible
Bugfixes
- fix source map source names for ContextModule to be relative
- fix
chunkLoading
option in module module - fix edge case where
evaluateExpression
returnsnull
- retain optional chaining in imported bindings
- include runtime code for the base URI even if not using chunk loading
- don't throw errors in persistent caching when importing node.js builtin modules via ESM
- fix crash when using
lazy-once
Context modules - improve handling of context modules with multiple contexts
- fix race condition HMR chunk loading when importing chunks during HMR updating
- handle errors in
runAsChild
callback
v5.70.0
Features
- update node.js version constraints for ESM support
- add
baseUri
toentry
options to configure a static base uri (the base ofnew URL()
) - alphabetically sort exports in namespace objects when possible
- add
__webpack_exports_info__.name.canMangle
- add proxy support to
experiments.buildHttp
-
import.meta.webpackContext
as ESM alternative torequire.context
- handle multiple alternative directories (e. g. due to resolve.alias or resolve.modules) when creating an context module
Bugfixes
- fix problem when assigning
global
to a variable - fix crash when using
experiments.outputModule
andloaderContext.importModule
with multiple chunks - avoid generating progress output before the compilation has started (ProgressPlugin)
- fix handling of non-static-ESM dependencies with using TLA and HMR in the same module
- include the asset module filename in hashing
-
output.clean
will keep HMR assets for at least 10s to allow HMR to access them even when compilation is faster then the browser
Performance
- fix asset caching when using the BannerPlugin
Developer Experience
- improve typings
Contributing
- capture caching errors when running the test suite
v5.69.1
Revert
- revert "handle multiple alternative directories (e. g. due to resolve.alias or resolve.modules) when creating an context module"
v5.69.0
Features
- automatically switch to an ESM compatible environment when enabling ESM output mode
- handle multiple alternative directories (e. g. due to
resolve.alias
orresolve.modules
) when creating an context module - add
util/types
to node.js built-in modules - add
__webpack_exports_info__.<name>.canMangle
api
Bugfixes
- fix bug in chunk graph generation which leads to modules being included in chunk desprite them being already included in parent chunks
- avoid writing more than 2GB at once during cache serialization (as workaround for node.js/libuv bug on MacOS)
- fix handling of whitespaces in semver ranges when using Module Federation
- avoid generating hashes which contain only numbers as they likely conflict with module ids
- fix resource name based placeholders for data uris
- fix cache serialization for context elements
- fix passing of
stage
option when instrumenting plugins for the ProfilingPlugin - fix tracking of declarations in concatenated modules to avoid conflicts
- fix unstable mangling of exports
- fix handling of
#
in paths of loaders - avoid unnecessary cache update when using
experiments.buildHttp
Contributing
- update typescript and jest
Developer Experience
- expose some additional typings for usage in webpack-cli
v5.68.0
Features
- allow to disable compile time evaluation of import.meta.url
- add
__webpack_module__
and__webpack_module__.id
to the api
Bugfixes
- fix handling of errors thrown in async modules
v5.67.0
Features
- add 'outputPath' configuration option for resource asset modules
- support Trusted Types in eval source maps
-
experiments.css
- allow to generate only exports for css in node
- add
SyncModuleIdsPlugin
to sync module ids between server and client compilation - add more options to the
DeterministicModuleIdsPlugin
to allow to generate equal ids
Developer Experience
- limit data url module name in stats printer
- allow specific description for CLI options
- improve space limiting algorithm in stats printing to show partial lists
- add
null
to errors in callbacks - fix call signature types of addChunkInGroup
Bugfixes
- avoid reporting non-existant package.jsons as dependencies
-
experiments.css
- fix missing css runtime when only initial css is used
- fix css hmr support
- bugfixes to css modules
- fix cache serialization for CreateScriptUrlDependency
- fix data url content when processed by a loader
- fix regexp in identifiers that include
|
- fix ProfilingPlugin for watch scenarios
- add layer to module names and identifiers
- this avoid random module id changes when additional modules are added to another layer
- provide hashFunction parameter to DependencyTemplates to allow customizing it there
- fix HMR when experiments.lazyCompilation is enabled
- store url as Buffer to avoid serialization warnings
- exclude
webpack-hot-middleware/client
from lazy compilation
Contributing
- remove travis configuration
- improve spell checking
v5.66.0
Features
- add
output.library.type: "commonjs-static"
to emit a statically analyse-able commonjs module (for node.js esm interop support) - add
experiments.css
(very experimental)
Bugfixes
- fix CORS headers for
experiments.lazyCompilation
- fix
[absolute-resource-path]
for SourceMap module naming - avoid stack overflow when accessing many memory cached cache values in series
Performance
- reduce default
watchOptions.aggregateTimeout
to 20ms
v5.65.0
Features
- static evaluation understands
undefined
now - reduce container entry code by a few chars
- use template literals when available and they make sense
Bugfixes
- handle
singleton
flag withoutrequiredVersion
in Module Federation - upgrade
watchpack
for context time info bugfix
Performance
- improve RegExp in error message formating for non-quadratic performance
Developer Experience
- automatically insert brackets when
output.globalObject
contains a non-trival expression - show error when using
script
type external with invalid syntax - expose types for
Resolver
,StatsOptions
andResolvePluginInstance
Preparations for the future
-
hashDigestLength
will default to 16 in webpack 6 (experiments.futureDefaults
)
v5.64.4
Bugfixes
- fix tagged template literal evaluation
- fix ModuleFederation with ESM
- fix outputModule with intial splitChunks
Performance
- upgrade watchpack for faster watcher updating
- track file and directory timestamps separately in watchpack and webpack
Developer Experience
- show origin of singleton shared module in mismatch warning
v5.64.3
Performance
- allow to use pre-compiled schema when
Infinity
is used in configuration - allow to use pre-compiled schema for configuration arrays
v5.64.2
Bugfixes
- avoid double initial compilation due to invalid dependencies with managedPaths
v5.64.1
Bugfixes
- fix regexp in managedPaths to exclude additional slash
- make module.accept errorHandler optional in typings
- correctly create an async chunk when using a
require(...).property
inrequire.ensure
- fix cleaning of symlinks in
output.clean: true
- fix change detection with
unsafeCache
withinmanagedPaths
(node_modules) - bump webpack-sources for Stack Overflow bugfix
v5.64.0
Features
- add
asyncChunks: boolean
option to disable creation of async chunks
Bugfixes
- fix ProfilingPlugin for
experiments.backCompat: false
Performance
- avoid running regexp twice over the file list
v5.63.0
Features
- allow passing
chunkLoading: false
to disable on-demand loading
Bugfixes
- fix
import 'single-quote'
in esm build dependencies
v5.62.2
Bugfixes
- fix
__system_context__
injection when using thelibrary
option on entrypoint - enable
exportsPresence: "error"
by default infutureDefaults
- fix bad performance for a RegExp in Stats printing (with large error messages)
- fix
exportPresence
->exportsPresence
typo - fix a bug with module invalidation when only module id changes with
experiments.cacheUnaffected
v5.62.1
Bugfix
- fix invalid generated code when omitting
;
v5.62.0
Features
- add options to configure export presence checking
-
parser.javascript.reexportExportsPresence: false
allows to disable warnings for non-existing exports during the migration fromexport ... from "..."
toexport type ... from "..."
for type reexports in TypeScript
-
- add
experiments.backCompat: false
to disable some expensive deprecations for better performance
Bugfixes
- use
['catch']
instead of.catch
for better ES3 support - fix removed parentheses when using
new (require("...")).Something()
- fix
{ require }
object literals -
splitChunks.chunks
option is now correctly used forsplitChunks.fallbackCacheGroup.maxSize
too - fix schema of
listen
option, allow to omitport
- add better support for Promises from different isolates
Developer Experience
- add typings for the webpack API that is available within modules
- use
/// <reference types="webpack/module" />
to use the typings in typescript modules - or
"types": [..., "webpack/module"]
in tsconfig
- use
v5.61.0
Bugfixes
- use a wasm md4 implementation for node 17 support
- include the
path
submodules in the node.js default externals
Performance
- improve string to binary conversion performance for hashing
Contribution
- CI runs on node.js 17
v5.60.0
Features
- Allow to pass more options to
experiments.lazyCompilation
. e. g. port, https stuff
Bugfixes
- fix
output.hashFunction
used to persistent caching too - Initialize
buildDependencies
Set correctly when loaders are added inbeforeLoaders
hook
v5.59.1
Bugfixes
- fix regexp in managedPaths
- fix hanging when trying to write lockfile for
experiments.buildHttp
v5.59.0
Features
- add
/*#__PURE__*/
forObject()
in generated code - add RegExp and function support for
managed/immutablePaths
- add hooks for multiple phases in module build
- improvements to
experiments.buildHttp
- allow to share cache
- add allowlist
- add
splitChunks.minSizeReduction
option
Bugfixes
- fix memory caching for Data URLs
- fix crash in
waitFor
when modules are unsafe cached - fix bug in build cycle detection
v5.58.2
Bugfixes
- fix serialization context passed
- fix a bug which caused module duplication when using persistent caching, unsafe cache and memory cache with GC
- fix validation of snapshots of non-existing directories
Performance
- store a hash in first bits of bigint to workaround v8 hashing: https://github.com/v8/v8/blob/b704bc0958e2e26305a68e89d215af1aee011148/src/objects/bigint.h#L192-L195
v5.58.1
Bugfixes
- fix
.webpack[]
suffix to not execute rules - revert performance optimization that has too large memory usage in large builds
v5.58.0
Features
- add hook for readResource
- add
diagnostics_channel
to node builtins
Performance
- improve chunk graph creation performance
- add cacheUnaffected cache support
- remove some caching that makes not difference
- improve splitChunks performance
- improve chunk conditions performance
v5.57.1
Bugfix
- fix experiments.cacheUnaffected which broke by last release
v5.57.0
Performance
- reduce number of hash.update calls
- allow ExternalModules to be unsafe cached
- improve hashing performance of module lists (StringXor)
Bugfixes
- experiments.cacheUnaffected
- handle module/chunk id changes correctly
- cache modules with async blocks
- show errors when using incompatible options
v5.56.1
Bugfix
- DefinePlugin: fix conflict with older variants of the plugin
v5.56.0
Performance
- make DefinePlugin rebuild check more efficient performance and memory wise
v5.55.1
Bugfixes
- fixes for
experiments.cacheUnaffected
- fix accidentically shared mem caches
- avoid RuntimeSpecMap in favor of directly setting on memCache
- compare references modules when restoring mem cache
v5.55.0
Performance
-
experiments.cacheUnaffected
- reduce cache memory usage
- make memCache per module
- cache ESM reexport computation
-
module.unsafeCache
- make it faster by moving it to Compilation-level instead of in NormalModuleFactory
- omit tracking resolve dependencies since they are not used when unsafe cache is enabled
- module graph
- lazy assign ModuleGraphConnections to Dependencies since that is only accessed when uncached
v5.54.0
Features
- improve constant folding to allow to skip more branches for
&&
||
and??
- allow all hashing using in webpack to be configured with
output.hashFunction
- no longer bailout completely from inner graph analysis when
eval
is used in a module
Bugfixes
- force bump enhanced-resolve for bugfixes
Performance
- reduce number of allocation when creating snapshots
- add
output.hashFunction: "xxhash64"
for a super fast wasm based hash function - improve utf-8 conversion when serializing short strings
- improve hashing performance for dependencies
- add
experiments.cacheUnaffected
which caches computations for modules that are unchanged and reference only unchanged modules
v5.53.0
Features
- add
node.__dirname/__filename: "warn-mock"
which warns on usage (will be enabled in webpack 6 by default)
Bugfixes
- add
stream/web
to Node.js externals - fix IgnorePluginSchema
- fix builds with persistent caching taking 1 minute to build at least
Experiments
- add
experiments.futureDefaults
to enable defaults for webpack 6
v5.52.1
Performance
- split fresh created persistent cache files by time to avoid creating very large files
v5.52.0
Feature
-
experiments.executeModule
is enabled by default and the option is removed- loaders are now free to use
this.importModule
- loaders are now free to use
Bugfixes
- fix generated
__WEBPACK_EXTERNAL_MODULE_null__
, which leads to merged externals -
.webpack[...]
extension is not part of matching and module name
v5.51.2
Bugfixes
- fix crash in FileSystemInfo when errors occur
- avoid property access of reserved properties
- fix reexports from async modules
- automatically close an active watching when closing the compiler
- when filenames of other runtimes are referenced that need a full hash, upgrade referencing runtime moduel to full hash mode too
- fixes a bug where
[contenthash]
is undefined when usingnew Worker
- fixes a bug where
v5.51.1
Bugfixes
-
library: "module"
propages top-level-await correctly - fix crash in filesystem snapshotting when trying to snapshot a non-existing directory
- fix some context-dependent logic in concatenated modules and source url handling
v5.51.0
Bugfixes
- correctly keep chunk loading state when the chunk loading logic is HMR updated
- This fixes some edge cases that e. g. occur when using lazy compilation for entrypoints. It is now able to HMR update that instead of needing a manual reload. Also see fixes in webpack-dev-server@4.
- track and resolve symlinks for filesystem snapshotting
- This fixes some cases of circular
yarn link
ing of dependencies. - It also fixes some problems when using package managers that use symlinks to deduplicate (e. g. cnpm or pnpm)
- This fixes some cases of circular
- pass the resulting module in the callbacks of
Compilation.addModuleChain
andCompilation.addModuleTree
v5.50.0
Features
- hashbangs (
#! ...
) are now handled by webpack
Performance
- disable cache compression by default as it tend to make performance worse
- I could still be enabled again for specific scenarios
- reduce the number of allocations during cache serialization
- This improves performance and memory usage
v5.49.0
Features
- add
experiments.buildHttp
to buildhttp(s)://
imports instead of keeping them external- keeps a
webpack.lock
file with integrity andwebpack.lock.data
with cached content that should be committed - Automatically upgrades lockfile during development when remote resources change
(might be disabled with
experiments.buildHttp.upgrade: false
) - Lockfile is frozen during production builds and usually no network requests are made
(exception:
Cache-Control: no-cache
). - The
webpack.lock.data
persisting can be disabled withexperiments.buildHttp.cacheLocation: false
. That will will introduce a availability risk. (webpack cache will be used to cache network responses)
- keeps a
Bugfixes
- fix HMR infinite loop (again)
- fix rare non-determinism with
splitChunks.maxSize
introduces in the last release - optional modules no longer cause the module to fail when
bail
is set - fix typo in records format: chunkHashs -> chunkHashes
Performance
- limit the number of parallel generated chunks for memory reasons
v5.48.0
Features
- enable import assertions again
Bugfixes
- upgrade webpack-sources for fixes regarding source maps
- fix infinite loop in HMR runtime code
v5.47.1
Bugfixes
- upgrade webpack-sources for a bunch of bugfixes regarding source maps and missing chars in output
v5.47.0
Performance
- improve source-map performance
Bugfixes
- avoid unnecessary
"use strict"
s in module mode
v5.46.0
Features
- status handlers in HMR api can now return Promises to delay the HMR process
- reasons in stats can now be grouped and collapsed
- add
stats.reasonsSpace
andstats.groupReasonsByOrigin
- add
Bugfixes
- fix a crash in asset modules when updating persistent cached modules from unsafe cached modules
Performance
- detailed preset limits all spaces to 1000 by default
- upgrade webpack-sources for a performance bugfix
v5.45.1
Bugfixes
- temporary revert import assertions because parser changes break the word
assert
in other places -
import(/* webpackPrefetch: true */ ...)
no longer breaks library output - DataURL tries to avoid re-encoding
- fix problems with DataURL encoding in some cases
v5.45.0
Features
- add support to import assertions
Bugfixes
- SourceMaps will now also be added to
.cjs
output files - fix non-system externals in a system library
Performance
- avoid copying timestamps from the watcher to the compiler
Contributing
- update to jest 27
v5.44.0
Features
- add support for
output.module
+optimization.runtimeChunk
Bugfixes
- fix inline externals with dash in type
v5.43.0
Features
- support
runtime: false
in entry description to disable runtime chunk - support
runtime
option in ModuleFederationPlugin and ContainerPlugin
Bugfixes
- fix
"module"
externals when concatenated
Performance
- serialize JSON data as buffer and parse on demand for performance and to avoid performance warning
v5.42.1
Bugfixes
- fix crashes when rebuilding with
jsonData
ordataUrl
of undefined
v5.42.0
Features
- add cache compression via
cache.compression
- enable cache compression by default for non-development modes
Bugfixes
- add
node-commonjs
to schema forexternalsType
- update acorn to fix problems with top level await
- fix regression for
system
externals
Performance
- fix a memory leak in the unsafe cache
v5.41.1
Bugfixes
- add missing types about experimental esm support to schema
- avoid slicing large Buffers as that doesn't always work for unknown reasons
Performance
- avoid slicing Buffers unnecessarily
v5.41.0
Features
- Persist cache faster when large changes are detected
- new option
cache.idleTimeoutAfterLargeChanges
to control that
- new option
Bugfixes
- shutdown lazy compilation server correctly
Experiments
- EcmaScript modules support (
experiments.outputModule: true
)-
output.library.type: "module"
: very basic support, no live bindings, unnecessary runtime code output.chunkLoading: "import"
output.chunkFormat: "module"
-
externalsType: "module"
generates nowimport * as X from "..."
(in a module) orimport("...")
(in a script) - Node.js commonjs externals use
import { createRequire } from "module"
in a module -
new Worker
etc. sets `type: "module"
-
v5.40.0
Features
- accept
node:
prefixed requests as node.js externals - avoid
instanceof Promise
in favor ofp && typeof p.then === "function"
to allow mixing different Promise implementions
Bugfixes
- fix usage analysis of class properties
Performance
- improve LazySet memory usage by shortcircuiting empty sets
- reduce algorithmic complexity of the structure analysis for plain objects serialization
Developer Experience
- allow
Buffer
inthis.emitFile
typings (loader context) - improve
reset
cli argument description
v5.39.1
Bugfixes
- reduce memory usage and fix memory leaks
v5.39.0
Features
- allow lazy compilation for
import()
context (import with expression)
Bugfixes
- fix respecting
cache.allowCollectingMemory
- fix cli loading after installing it
- fix initial list of non-js chunks that are flagged as already loaded
Performance
- remove unnecessary
Error.captureStackTrace
from webpack errors
v5.38.1
Performance
- fix missing increment in sorting optimization from last release
v5.38.0
Features
-
new URL("data:...", import.meta.url)
is now supported - add
module.rules[].scheme
as condition to match the request scheme (likedata
,http
, etc.)
Bugfixes
- fix tracking of changes and removals during watching in some edge cases
- fix incorrect renaming of class fields in concatenatenated modules
- fix crash in HMR when removing runtimes from the compilation
Performance
- lazy import some internal modules only when used
- allow unsafe caching of the entrypoint
- improve performance of sorting exports info map
- update to latest webpack-sources for improved source map performance
v5.37.1
Bugfixes
- When using multiple configurations in watch mode and calling
Watching.invalidate
,dependencies
andparallelism
of the config array is now respected correctly - Fix a crash when accessing the
stats
after the next compilation has started - fix collecting changes when using
Watching.suspend
- fix schema of
RuleCondition.not
and allow passing a condition directly instead of only an array
Developer Experience
- typings accept a ReadonlyArray of configurations now
Contributing
- fix coverage reporting for child processes
- remove outdated loader from readme
v5.37.0
Features
- add
output.trustedTypes
Bugfixes
- fix inclusion of too many chunk in the filename function when using
dependOn
- allow errors to be
null
in fs callbacks
Developer Experiences
- make ESM tracking info message less verbose
- add typings for loaders
v5.36.2
Bugfixes
- correctly handle errors thrown during parser/generator creation
- e. g. validation errors for asset module options
- use a better automatic runtime name for workers
- not too long to cause filename problems
- no longer assume assets do not get removed when the compiler is running
- Using
output.clean
is against this assumption - It fixes a bug where assets are missing, when removed and readded to the compilation
- Using
- fix a problem when chained dependOn, which causes too many modules being included in entrypoints
v5.36.1
Performance
- add
cache.profile
(type: "filesystem"
only) flag for more info about (de)serialization timings - avoid complex "by exports" splitting for splitChunks in development mode
- faster hashing for the common case
- improve algorithmic complexity for merging InitFragments to solve performance in an edge case
v5.36.0
Features
- add support for class fields (stage 4)
Performance
- improve (de)serialization performance of dependency locations
v5.35.1
Bugfixes
- fix an
__webpack_exports__ is not defined
error with some library types
performance
- improve stats grouping performance
- improve providedExports analysis performance
- improve hashing performance
- lazy merge dependencies from creating context modules
- improve dependency parents access performance
v5.35.0
Bugfixes
- fix handling of build dependencies with
#
in path
Performance
- improve memory usage when using the filesystem cache
When reading a file into a Buffer and picking smaller slices of the Buffer the small slices still keep a reference to the large original Buffer. The leads to increased memory usage. A fix would be to clone the slice into a smaller Buffer when wasting too much memory, but this has a performance cost. There is now a new option
cache.allowCollectingMemory
which controls that. For one-off builds you probably wantallowCollectingMemory: false
and for watch builds you probably wantallowCollectingMemory: true
. It defaults to false in production mode and true in development mode.
v5.34.0
Features
- add support for empty string in
resolve.extensions
and handle them in this order - add
pnpapi
as builtin external when usingtarget: "node"
Bugfixes
- fix a bug where chunks filenames where not included in runtime when using splitChunks and runtimeChunk with
target: "node"
- fix deprecation message from LimitChunkCountPlugin
Performance
- precompile schemas into functions to avoid schema compilation overhead
- fix performance regression when storing the cache
- performance improvement for snapshot file iterators
Developer Experience
- remove removed
store: 'idle'
from schema description
v5.33.2
Bugfix
- handle falsy entry options correctly
v5.33.1
Bugfix
- fix passing publicPath to
this.importModule
v5.33.0
Features
- adds support for specifying a
publicPath
per entrypoint- add
entry.xxx.publicPath
option
- add
Bugfix
- disable injection of chunk loading logic for
executeModule
Performance
- performance improvements for
export *
and reexports
v5.32.0
Features
- add support for a pseudo extensions
.webpack[type]
(e. g..webpack[javascript/auto]
) to specify the default module type when no other module type is specified- to be used with
!=!
inline syntax
- to be used with
Bugfixes
- fixes incorrect cache invalidation when new properties are added to the DefinePlugin
Experiments
- add
experiments.executeModule
to allow build-time execution of modules of the module graph- add
this.importModule(request, options, [callback]): Promise
to the loader context - add
compilation.executeModule(request, options, callback)
for plugins
- add
v5.31.2
Bugfixes
- revert disposing of CodeGenerationResults since some plugins rely on the fact that they are still accessible after the compilation
v5.31.1
Bugfixes
- invalid hooks is no longer called twice for a compiler in a MultiCompiler
Memory
- eliminated some memory leaks
- dispose code generation results after sealing the compilation
Performance
- improve performance of cache serialization by reducing number of write syscalls
v5.31.0
Features
- add a few more options for infrastructure logging:
-
infrastructureLogging.colors
: Enables/Disables colorful output. -
infrastructureLogging.appendOnly
: Only appends lines to the output. Avoids updating existing output e. g. for status messages. -
infrastructureLogging.stream
: Stream used for logging output. Defaults to process.stderr. -
infrastructureLogging.console
: Custom console used for logging. - When stream is an TTY colors is enabled and appendOnly is disabled. Otherwise it's flipped.
-
Bugfixes
- Persistent Caching
- fix caching crash when using fsevents in build dependencies
- improve resolving of build dependencies when
exports
field is used - make problems during resolving build dependencies warnings instead of debug messages
- prioritize static reexport over runtime reexport for target determination
- This helps in optimization by no longer opting out of optimization when some other exports any dynamic (from commonjs or empty/type-only modules)
- fix bug with subtraction of runtimes
- This fixes a problem with concatenated modules in builds with multiple runtimes and force-merged shared chunks
- ensure that entrypoints are always re-executed when HMR-updated
- This fixes no longer updating pages when the entrypoint crashed
v5.30.0
Features
- add GC to memory cache
- opt-in via
cache.maxGenerations
whencache.type: "memory"
- default for
cache.type: "filesystem"
andmode: "development"
- configure via
cache.maxMemoryGenerations
whencache.type: "filesystem"
- Generations = Rebuilds
- opt-in via
- add GC for untouched filesystem cache files
- allow to configurate GC for the filesystem cache via
cache.maxAge
- allow to disable memory cache when using the filesystem cache with
cache.maxMemoryGenerations: 0
- Caches will be cleared on Compiler close resp Cache shutdown (after persisting for the filesystem cache)
Bugfixes
- add a few workarounds for v8 bug that causes memory leaks in optimized code (only partially fixes it)
- after serializing filesystem no longer keeps cache items in memory, instead it will read them from disk again when accessed
GC = Garbage Collection
v5.29.0
Bugfixes
- fix some edge cases for
splitChunks.maxSize
which cause too large chunks to be created - add
stats.groupModulesByType
to the schema
Developer Experience
- add resolving trace for error during resolving build dependencies
- expose Stats-related types
- exports AsyncDependenciesBlock and
Module/Const/NullDependency
on the API
v5.28.0
Features
- add
module.generator.asset.publicPath
to configure a different publicPath for assets
Bugfixes
- fixes a watch mode caching problem which was introduced in 5.26.0 when using the unsafe cache
Performance
- improve serialization performance
v5.27.2
Bugfixes
- fix error reporting when errors happen in
beforeLoaders
hook - avoid crash when
experiments.lazyCompilation
is used (regression) - fix lazy compilation opt-out when HMR accept/decline is used on an
import()
- fix
new URL(new URL
generated by worker handing
v5.27.1
Bugfix
- allow invalidation after first watch run in MultiCompilers
v5.27.0
Features
- add
utils: { contextify(context, absolutePath), absolutify(context, request) }
to loader context
Bugfixes
- fix caching bug when split chunks of an entrypoint change and modules of the entrypoint stay equal
- fix
imports
field handling - fix incorrect id assignment of record ids plugin
- this causes ids changing unnecessary during watch mode
- fix library exports when using onChunks in entry
- This prevented using libraries with web target when using splitChunks for the initial chunks
v5.26.3
Bugfix
- fix race condition in MultiCompiler queueing
v5.26.2
Bugfixes
- fix problem with new line after comment
- fix assign libraries with runtime chunk
v5.26.1
Bugfixes
- avoid using strict mode runtime for assign libraries to allow assigning not existing variables
- avoid collision with
Set.addAll
polyfill - allow filenames starting with
../
when generation the undo path for non-web targets
v5.26.0
Features
- handle cache version automatically for DefinePlugin
- Values no longer need to be defined as build dependencies
- add more options for
DefinePlugin.runtimeValue
(file/context/missing/buildDependencies, version)
Bugfixes
- fix a memory leak which happens in watch mode with caching when modules are removed from the compilation
- fix usage of some arrow functions when es5 target is selected
- chunk loading in workers now uses publicPath instead of relative paths
- fixes a problem when worker file is in a child directory
v5.25.1
Bugfixes
- fix startup logic when non-js chunks are in the entrypoint
- remove
type: "module"
for Workers when generating classic scripts
v5.25.0
Features
- Refactor the startup logic to improve library support
- add
__webpack_runtime_id__
to access the current runtime id - improve error handling for HMR
- add second argument to self accept error handler to pass new module and module id
- add error handler argument to dependency accept, passing error and module ids
- add
output.strictModuleErrorHandling
to opt into stricter evaluation error handling semantics according to ESM spec- used by default when HMR is enabled
- when ignoring a module used by
new URL()
this will result in an url to a empty file ("data:,"
) - add
module.generator.asset.emit
option to disable creating assets from asset modules (e. g. for SSR)
Bugfixes
- fix problem when library options apply to a non-runtime chunk
- fix crash in
splitChunks.maxSize
where negative indicies are accessed - fix sub-optimal splitting of
splitChunks.maxSize
in some cases when multiple size types are involved - fix a memory leak in AssetGenerator
- fix usage of runtime globals in SharedPlugin to support HMR updates
Deprecations
- deprecate
output.strictModuleExceptionHandling
(this is the CommonJS way of handling errors, and the name is weird)
v5.24.4
Bugfixes
- fix overridding built-in externals via
externals
- fix handling UNC paths as windows paths
- Improve error when passing an empty array as library name
- avoid adding the package.json from compilation context as build dependency
- fix expansion of
"..."
in array configuration options when it's not at the start
v5.24.3
Bugfixes
- fix contenthash when a file is emitted twice with different filenames but that same contenthash
v5.24.2
Bugfixes
- fix invalid syntax generated for destructuring with default values
- fix some incorrect properties accesses in watch
-
modifiedFiles
andremovedFiles
were undefined
-
- fix some edge cases with MultiCompiler
v5.24.1
Performance
- improve performance of finding modules to concatenate
- improve performance of getting incoming modules from connections
- make sure that all serialized modules restore correctly
- avoid storing ConcatenatedModule, since that's not needed
Developer Experience
- fix typo in deprecation message
v5.24.0
Bugfixes
- fix name conflict when using destructing with default arguments in concatenated modules
- fix tracking of reexports in concatenated modules when using multiple
export *
that point to the same export - debug logging is now included even if logging is not
- fix name of ModuleConcatenationPlugin logger
- fix
experiments.lazyCompilation: true
. It now has an effect.
Developer Experience
- expose
Watching
type
Contribution
- fix husky setup
Performance
- improve performance of module concatenation
v5.23.0
Features
- add
parserOptions.url: "relative"
option- Allows to generate relative URLs from
new URL
(e. g. for SSG/SSR)
- Allows to generate relative URLs from
Bugfixes
- fixes for electron target
- electron has importScripts in worker
- only choose a chunkLoading which fits to the chunkFormat
- prefer fetch wasm loading over node wasm loading
- fix regression when combining library + runtimeChunk + node target
Developer Experience
- export MultiStats type
v5.22.0
Features
- generate shorter output code for JSON data by using a
'...'
string instead of"..."
(only affects output side when not minimized) - the
dependencies
configuration option now works for watch builds too- It will build compilation when any of
dependencies
has changed - It will wait for compiling until all of
dependencies
have finished
- It will build compilation when any of
- add
parallelism
config option on the array of configurations to limit the compilers that are running in parallel
Developer Experience
- add hints (
Did you mean ...
) to resolve errors when- resolving fails due to
enforceExtension
- relative request is missing leading
./
- resolving fails due to
- when all modules of an entrypoint fail resolving and another entrypoints
depend(s)On
it, webpack no longer crashes with a weird error - add hint to stats how to get details about errors/warnings in child compilations
- improve error message for lazyCompilation when using IE11
Bugfixes
- async entries e.g. for Workers are now implicitly flagged as "having side effects" even if they are affects by
"sideEffects": false
- in future we might add a warning for this
- avoid crash when using
this.loadModule
(loader) and the loaded module has errors - refactor libraries to inline exporting code into runtime to allow using with
output.iife: false
- fix invalid code when using
define
for local modules and arrow functions are supported - fix missing runtime requirement for system.js context
- fix parsing of
define
function, which missed declarations before - avoid unnecessary calls to loaders when serializer are already registered
- fix inner graph analysis for exports when
export { x }
is before pure declarationconst x = /*#__PURE__*/ f()
- fix hashing order of runtime chunks when there are async entries involved
Contribution
- CI run tests on node.js 15 too
- CI run tests on github actions too
Experiments
- improvements on experimental
output.library: { type: "module" }
(experiments.outputModule: true
)- it can generate
export { ... }
now, but that can't handle live-bindings yet
- it can generate
v5.21.2
Bugfixes
- json with
constructor
property now caches correctly - json generation with object prototype property now works correctly
- tree shaking json array when accessing
length
property now works correctly - fix incorrect call context when calling properties on imports from CommonJS modules
v5.21.1
Bugfixes
- fix a crash when using colors in stats
v5.21.0
Features
- add
__webpack_base_uri__
to change base URI at runtime - add
stats.errorDetails: "auto"
to show error details automatically when there are only 1 or 2 errors
Bugfixes
- fix a hanging build when using the persistent cache without a package.json in cwd
Developer Experience
- add typings for the stats JSON
- change default for
stats.errorDetails
to"auto"
when usingtoString
- Highlight important text in error message with colors
- e. g.
Did you mean ...?
and similar hints are shown in green
- e. g.
v5.20.2
Bugfixes
- fix caching issue with asset modules causing
undefined
files - fix problem that rebuildModule doesn't follow dependencies
v5.20.1
Bugfix
- fix
Caching failed for pack: RangeError [ERR_OUT_OF_RANGE]
warning when serializing the cache
v5.20.0
Features
- add
experiments.lazyCompilation.imports
to disable lazy compilation ofimport()
s - add
experiments.lazyCompilation.test
to allow custom selection of modules that should be lazy compiled - When using
profile: true
resp.--profile
webpack will now print a summary of expensive modules or loaders
Bugfixes
- fix that
experiments.lazyCompilation.client
now works as intended - fix a bug which causes runtime requirements to be missing e. g.
__webpack_require__ is not defined
Developer Experience
- expose
EntryObject
type in typings - remove
pkg-dir
dependency
v5.19.0
Features
- allow to set chunk name for
exposes
forModuleFederationPlugin
Bugfixes
- add a missing simicolon in runtime code
- improve consistency of top level await with other implementations and the spec
- make
options
forProgressPlugin
optional in typings
Performance
- try to avoid unnecessary allocations
v5.18.0
Internals
- refactor hashing to move the responsibility of hashing module exports info and referenced modules from Dependencies to the Module
- Hashing in Dependencies can be much cheaper now (could improve performance when many dependencies are used that point to the same module, like many references to
React.createElement
) - Fixes bugs where Dependencies forgot to hash some details about the referenced module
- The new model elimiates the potential of such bugs are Dependencies have less responsibilities now
- Hashing in Dependencies can be much cheaper now (could improve performance when many dependencies are used that point to the same module, like many references to
v5.17.0
Features
- add experimental lazy compilation via
experiments.lazyCompilation: true
for web and node targets- compiles entrypoints and
import()
s only when they are accessed - More details see: https://github.com/webpack/webpack/pull/12469
- Known issues:
webpack-dev-server
/webpack serve
opening an entrypoint for the first time, sometimes need a manual refresh.
- compiles entrypoints and
- move some javascript parsing related configuration options from
module
tomodule.parser.javascript
and also allow to set them viamodule.rules
- add
module.parser.javascript.commonjsMagicComments
to enable/* webpackIgnore: true */
forrequire()
calls
Bugfixes
- fix a problem with
webpack.debug.ProfilingPlugin
on Mac when the computer was suspended before. - fix a bug with IIFE handling when the IIFE has parameters with default values
v5.16.0
Features
- add
__webpack_is_included__("./some-module")
which returns true when the module is bundled and false when not - priorize eager shared modules over normal shared modules (with the same version), as they are loaded anyway
- add
library.type: "assign-properties"
which merges all exports into a global variable - allow
optimization.innerGraph
fornew URL()
- This allows to detect which URLs are used and drop the module and asset when they are not.
Bugfixes
- only return exports from runtime when needed
- This allows to use
experiments.outputModule: true
withoptimization.runtimeChunk
- This allows to use
- fix a bug that
splitChunk.reuseExistingChunk
doesn't work for entrypoints- This optimized an edge case where a nearly empty entrypoint is created when an entrypoint contains only vendor modules
Developer Experience
- include plugin names in deprecation message for "NormalModuleFactory.xxx is no longer a waterfall hook"
- improve error message when passing an invalid library name
v5.15.0
Features
- add
getResolve
method to data object when using functionexternals
-
externals
function may return a promise now
Bugfixes
- fix
define("local-module", expr)
generating invalid syntax - fix resolving bug when resolving build dependencies
- add
chunkModulesSpace
to schema - fix
rebuildModule
api
Performance
- improve performance of build dependencies resolving
v5.14.0
Features
- add experimental ESM tracking for build dependencies
Bugfixes
- fix crash when calling
watcher.getContextTimeInfoEntries()
- make filesystem types compatible with
memfs
and realfs
- fix rebuild error when using the
AutomaticPrefetchPlugin
Contribution
- improve type definitions by using typescript 4.2
v5.13.0
Features
- add
resolve.preferAbsolute
flag for compatibility with webpack 4 - add support for wildcards in
exports
andimports
field - improve chunk and module names
- use
nameForCondition()
as fallback for module names - handle module connection with only transive side effects correctly when determining chunk root modules
- use
v5.12.3
Bugfixes
- upgrade
@webassembly/*
andterser-webpack-plugin
dependencies
v5.12.2
Bugfixes
- fix problem with typings in strict mode
v5.12.1
Bugfixes
- fix a crash in ConcatenatedModule when deserializing
- fix some not serializable warnings
- show error when using an invalid identifier as
var
library
v5.12.0
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 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
v5.11.1
Bugfixes
- ignore cloned ExportInfo during hashing
- fixes a problem where changing modules affects hashes in some other part of the application during development
- fixes compileBooleanMatcher when prefix and suffix overlap
- fixes invalidate code generated when generating properties access
- fix
object
types in typings - expose more types regarding Stats
v5.11.0
Features
- update typings to include undefined/null types (for strict type)
- export WebpackError
- export Asset and AssetInfo types
- allow error configuration for
validateSchema
function
Bugfixes
- fix typings for SourceMapSource
- allow custom properties in AssetInfo
- handle
undefined
values for rule conditions like empty strings
v5.10.3
Bugfixes
- errors in initial cache no longer cause build dependencies to be ignored
- manual side effects flagging should override automatic analysis
- modules in dlls without entryOnly will no longer be dropped because of no side effects
v5.10.2
Bugfixes
- add a few missing node.js libraries as externals in
target: "node"
- improve cache (de)serialization to allow larger cache files (>2GB) and increase performance for them
v5.10.1
Bugfixes
- avoid duplicating chunk info in chunk loading global
- allow executing chunks before runtime is loaded
- avoid error when emitting assets with different query string but identical filename and content
- fix duplicated asset name in
processAssets
withadditionalAssets
- add missing
\
in module info header comment
v5.10.0
Bugfixes
- Multiple fixes regarding the side effects optimization (
"sideEffects": false
) when reexports and concatenated modules are combined
Contributing
- Typescript major 4
- Improved internal structure of our typings
Performance
-
output.pathinfo: true
(default in development) adds less verbose information (and is faster) -
output.pathinfo: "verbose"
adds more verbose information -
output.pathinfo: true
is cached - avoid assets and module stats information generation when they are cached and cached assets/modules are not shown
v5.9.0
Features
- improve side effects analysis to report imported and reexported symbols as side-effect-free
Bugfixes
- fix problem when HMR and different runtimes (e. g. with Workers)
- caused crash with
... has no hash info for runtime ...
- caused crash with
v5.8.0
Features
- add the ability to process assets generated in later stages during processAssets
- new processAssets stage:
PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE
- add hooks to the RealContentHashPlugin to allow to process custom hashes (e. g. SRI)
Bugfixes
- fix typing for child compiler plugins
- SourceMapPlugin will process assets added in later stages during asset processing
v5.7.0
Features
- CLI supports installing webpack-cli via
pnpm
Bugfixes
- fix problem with ASI detection, causing semicolons inserted after
if(...)
etc.
v5.6.0
Bugfixes
- emit warnings/errors for exports in commonjs modules for which we know that they don't exist
v5.5.1
Bugfixes
- fix crash when __esModule is defined with defineProperty without value
v5.5.0
Bugfixes
- fix ASI issues that occur between concatenated modules
- fix incorrect handling of
[id]
and etc. in SourceMap sources - fix side-effect-free handling of exports for concatenated modules that causes an unused export
- make ESM-CJS interop handling consistent
- make
__esModule
flag consistent exposed - handle non enumerable exports
- handle inherited exports
- handle exported Promises
- make
v5.4.0
Bugfixes
- fix renaming in super class expression in nested scopes
- fix parsing and handling of browserlist queries
- fix a few edge cases with ESM-CJS interop and .mjs
- fix ASI edge cases
v5.3.2
Bugfixes
- runtime-dependent concatenated modules can generate code for runtime-dependent execution order of concatenated modules
v5.3.1
Bugfixes
- fix incorrect concatenation of modules when multiple runtimes are involved
- fixes a "This should not happen" error
- fixes a
__webpack_require__(null)
problem
- run CLI correctly after installing
- fixes a huge performance issue when processing minimized code with SourceMap
- Use
string[]
types instead of[string, ...string[]]
for arrays that must not be empty- this is more convinient to use
Performance
- avoid incorrect store of counts in the ProgressPlugin, which causes unneeded serialization of the Persistent Cache
- upgrade terser-webpack-plugin for performance improvements
- upgrade webpack-sources for performance improvements
v5.3.0
Features and Bugfixes
- generate runtime conditional code when modules are forcefully merged from multiple runtimes
- This fixes a
Cannot read property 'call' of undefined
error in webpack runtime, because modules are used that are not in the graph in one runtime
- This fixes a
- disabled source code analysis for side effects in non-production modes
- this causes unnecessary changes to parent modules in development
- add
optimization.sideEffects: "flag"
as option for this
v5.2.1
Bugfixes
- add
watchOptions.followSymlinks
option to schema - fix hard crash when calling resolve with undefined value
- fix emit problem when files have hash in query string
- fix unneeded generation of SourceMaps when no devtool is used
- fixes a huge performance regression with terser-webpack-plugin
v5.2.0
Features
- add
sourceFilename
andjavascriptModule
to asset info for plugins
Bugfixes
- fix variable name collision when using module concatenation
- fix arrow functions in ie 11
- fix
this
externals with module concatenation - force update for enhanced-resolve for critical bugfixes (see changelog)
v5.1.3
Bugfixes
- omit unused modules from chunks when modules are only unused in some runtimes
- fixes
Self-reference dependency has unused export name
error
- fixes
- fix order of asset optimization to fix conflict between compression-plugin and real hash plugin
v5.1.2
Bugfixes
- revert: omit unused modules from chunk when modules are only unused in some runtimes
- caused issues with mini-css modules
v5.1.1
Bugfixes
- fix order of chunk hashing to allow to uses hashes in WebWorkers
- update to terser-webpack-plugin 5
- reduces number of dependencies by dropping webpack 4 support
- omit unused modules from chunk when modules are only unused in some runtimes
- fixes
Self-reference dependency has unused export name
error
- fixes
- fix hanging production builds because of infinite loop in inner graph optimization
-
Compilation.deleteAsset
updates chunk to file mappings
v5.1.0
Features
- expose
webpack
property fromCompiler
- expose
cleverMerge
,EntryOptionPlugin
,DynamicEntryPlugin
Bugfixes
- missing
require("..").xxx
in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free
- fix incorrect deprecation message for ModuleTemplate.hooks.hash
v5.0.0
webpack/webpack-cli (webpack-cli)
v6.0.1
Bug Fixes
v6.0.0
BREAKING CHANGES
- the minimum required Node.js version is
18.12.0
- removed
init
,loader
andplugin
commands in favorcreate-webpack-app
- dropped support for
webpack-dev-server@v4
- minimum supported webpack version is
5.82.0
- The
--define-process-env-node-env
option was renamed to--config-node-env
Bug Fixes
- allow to require
webpack.config.js
in ESM format (#4346) (5106684) - correct the minimum help output (#4057) (c727c4f)
- gracefully shutting down (#4145) (90720e2)
- improve help output for possible values (#4316) (4cd5aef)
- no serve when dev-server is false (#2947) (a93e860)
Features
5.1.4 (2023-06-07)
Bug Fixes
- multi compiler progress output (f659624)
5.1.3 (2023-06-04)
Bug Fixes
5.1.2 (2023-06-04)
Bug Fixes
- improve check for custom webpack and webpack-dev-server package existance (0931ab6)
- improve help for some flags (f468614)
- improved support for
.cts
and.mts
extensions (a77daf2)
5.1.1 (2023-05-09)
Bug Fixes
v5.1.4
Bug Fixes
- multi compiler progress output (f659624)
v5.1.3
Bug Fixes
v5.1.2
Bug Fixes
- improve check for custom webpack and webpack-dev-server package existance (0931ab6)
- improve help for some flags (f468614)
- improved support for
.cts
and.mts
extensions (a77daf2)
v5.1.1
Bug Fixes
v5.1.0
Features
Performance Improvements
5.0.2 (2023-04-21)
Bug Fixes
- error message for missing default export in configuration (#3685) (e0a4a09)
- perf: reduced startup time (3b79059)
5.0.1 (2022-12-05)
Bug Fixes
v5.0.2
Bug Fixes
- error message for missing default export in configuration (#3685) (e0a4a09)
- perf: reduced startup time (3b79059)
v5.0.1
Bug Fixes
v5.0.0
Bug Fixes
- improve description of the
--disable-interpret
option (#3364) (bdb7e20) - remove the redundant
utils
export (#3343) (a9ce5d0) - respect
NODE_PATH
env variable (#3411) (83d1f58) - show all CLI specific flags in the minimum help output (#3354) (35843e8)
Features
- failOnWarnings option (#3317) (c48c848)
- update commander to v9 (#3460) (6621c02)
- added the
--define-process-env-node-env
option - update
interpret
to v3 andrechoir
to v0.8 - add an option for preventing interpret (#3329) (c737383)
BREAKING CHANGES
- the minimum supported webpack version is v5.0.0 (#3342) (b1af0dc), closes #3342
- webpack-cli no longer supports webpack v4, the minimum supported version is webpack v5.0.0
- webpack-cli no longer supports webpack-dev-server v3, the minimum supported version is webpack-dev-server v4.0.0
- remove the
migrate
command (#3291) (56b43e4), closes #3291 - remove the
--prefetch
option in favor thePrefetchPlugin
plugin - remove the
--node-env
option in favor--define-process-env-node-env
- remove the
--hot
option in favor of directly using theHotModuleReplacement
plugin (only forbuild
command, forserve
it will work) - the behavior logic of the
--entry
option has been changed - previously it replaced your entries, now the option adds a specified entry, if you want to return the previous behavior please usewebpack --entry-reset --entry './src/my-entry.js'
webpack/webpack-dev-server (webpack-dev-server)
v5.2.2
v5.2.1
Security
- cross-origin requests are not allowed unless allowed by
Access-Control-Allow-Origin
header - requests with an IP addresses in the
Origin
header are not allowed to connect to WebSocket server unless configured byallowedHosts
or it different from theHost
header
The above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.
Bug Fixes
- prevent overlay for errors caught by React error boundaries (#5431) (8c1abc9)
- take the first network found instead of the last one, this restores the same behavior as 5.0.4 (#5411) (ffd0b86)
v5.2.0
Features
- added
getClientEntry
andgetClientHotEntry
methods to get clients entries (dc642a8)
Bug Fixes
- speed up initial client bundling (145b5d0)
v5.1.0
Features
- add visual progress indicators (a8f40b7)
- added the
app
option to beFunction
(by default only withconnect
compatibility frameworks) (3096148) - allow the
server
option to beFunction
(#5275) (02a1c6d) - http2 support for
connect
andconnect
compatibility frameworks which support HTTP2 (#5267) (6509a3f)
Bug Fixes
- check the
platform
property to determinate the target (#5269) (c3b532c) - ipv6 output (#5270) (06005e7)
- replace
rimraf
withrm
(#5162) (1a1561f) - replace default gateway (#5255) (f5f0902)
- support
devServer: false
(#5272) (8b341cb)
5.0.4 (2024-03-19)
Bug Fixes
5.0.3 (2024-03-12)
Bug Fixes
5.0.2 (2024-02-16)
Bug Fixes
5.0.1 (2024-02-13)
Bug Fixes
- avoid using eval in client (#5045) (7681477)
- overlay and
require-trusted-types-for
(#5046) (e115436)
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0
4.15.1 (2023-06-09)
Bug Fixes
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.