v0.7.4
Update dependency webpack to v5.104.1 [SECURITY]
Notable changes
2efd21b: Reexports runtime calculation should not accessing WEBPACK_IMPORT_KEY decl with var.c510070: Fixed a user information bypass vulnerability in the HttpUriPlugin plugin.d3dd841: Use method shorthand to render module content in__webpack_modules__object.d3dd841: Enhanceimport.meta.envto support object access.4baab4e: Optimize dependency sorting in updateParent: sort each module only once by deferring to finishUpdateParent(), and reduce traversal count in sortWithSourceOrder by caching WeakMap values upfront.04cd530: Handle more at-rules for CSS modules.cafae23: Added options to control the renaming of at-rules and various identifiers in CSS modules.d3dd841: Addedbase64url,base62,base58,base52,base49,base36,base32andbase25digests.5983843: Provide a stable runtime function variable__webpack_global__.d3dd841: ImprovedlocalIdentNamehashing for CSS.22c48fb: Added module existence check for informative error message in development mode.50689e1: Use the fully qualified class name (or export name) for[fullhash]placeholder in CSS modules.d3dd841: Support universal lazy compilation.d3dd841: Fixed module library export definitions when multiple runtimes.d3dd841: Fixed CSS nesting and CSS custom properties parsing.d3dd841: Don't write fragment from URL to filename and apply fragment to module URL.aab1da9: Fixed bugs forcss/globaltype.d3dd841: Compatibilityimport.meta.filenameandimport.meta.dirnamewithevaldevtools.d3dd841: Handle nested__webpack_require__.728ddb7: The speed of identifier parsing has been improved.0f8b31b: Improve types.d3dd841: Don't corruptdebugIdinjection whenhidden-source-mapis used.2179fdb: Re-validate HttpUriPlugin redirects against allowedUris, restrict to http(s) and add a conservative redirect limit to prevent SSRF and untrusted content inclusion. Redirects failing policy are rejected before caching/lockfile writes.d3dd841: SerializeHookWebpackError.d3dd841: Added ability to use built-in properties in dotenv and define plugin.3c4319f: Optimizing the regular expression character class by specifying ranges for runtime code.d3dd841: Reduce collision for local indent name in CSS.d3dd841: Remove CSS link tags when CSS imports are removed.- Added
DotenvPluginand top leveldotenvoption to enable this plugin - Added
WebpackManifestPlugin - Added support the
ignoreListoption in devtool plugins - Allow to use custom javascript parse function
- Added
import.meta.envsupport for environment variables - Added support for
import.meta.dirnameandimport.meta.filename - Added support
import.defer()for statistical path - Handle import.meta.main
- Added suport to setup named exports for JSON modules and disable usage named export for
import file from "./file.json" with { type: "json" } - Added support
__dirname/__filename/import.meta.dirname/import.meta.filenamefor universal target - [CSS] Added the
exportTypeoption withlink(by default), "text" andcss-style-sheetvalues - [CSS] Added support for
composesproperties - The
dependOnchunk must be loaded before the common chunk - Return to namespace import when the external request includes a specific export
- No runtime extra runtime code for module libraries
- Delay HMR accept dependencies to preserve import attributes
- Properly handle external presets for universal target
- Fixed incorrect identifier of import binding for module externals
- Fixed when defer import and dynamic default export mixed
- Reduce generated output when
globalThissupported - Fixed loading async modules in defer import
- Reexport module for default import when no used exports for systemjs library
- Rename HarmonyExportDependencyParserPlugin exported id to CompatibilityPlugin tagged id
- Handle
__dirnameand__filenamefor ES modules - Rename single nested
__webpack_export__and__webpack_require__in already bundled code - [Types] webpack function type
- [Types] NormalModule type
- [Types] Multi compiler configuration type
- [Types] Fixed regression in custom
hashDigesttype - [CSS] No extra runtime for initial chunk
- [CSS] Fixed a lot of CSS modules bugs
- Supported
extendswithenvforbrowserslist - Supported
JSONPfragment format for web workers. - Fixed dynamic import support in workers using
browserslist. - Fixed default defer import mangling.
- Fixed default import of
commonjsexternals forSystemJSformat. - Fixed context modules to the same file with different import attributes.
- Fixed typescript types.
- Improved
import.metawarning messages to be more clear when used directly. - [CSS] Fixed CC_UPPER_U parsing (E -> U) in tokenizer.
- 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.contextModuleto configure snapshots options for context modules - Added the
extractSourceMapoption to implement the capabilities of loading source maps by comment, you don't needsource-map-loader(look at example) - The
topLevelAwaitexperiment is now stable (you can removeexperiments.topLevelAwaitfrom yourwebpack.config.js) - The
layersexperiment is now stable (you can removeexperiments.layersfrom yourwebpack.config.js) - Added function matcher support in rule options
- 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
thisexports - Removed unused
timeoutattribute of script tag - Supported UMD chunk format to work in web workers
- Improved CommonJs bundle to ES module library
- Use
es-lexerformjsfiles for build dependencies - Fixed support
__non_webpack_require__for ES modules - Properly handle external modules for CSS
- AssetsByChunkName included assets from
chunk.auxiliaryFiles - Use
createRequireonly when output is ES module and target is node - Typescript types
- Avoid extra calls for snapshot
- A avoid extra jobs for build dependencies
- Move import attributes to own dependencies
- Fixed resolve execution order issue from extra await in async modules
- Avoid empty block for unused statement
- Collect only specific expressions for destructuring assignment
- Fixed syntax error when comment is on the last line
- Handle var declaration for
createRequire - Distinguish free variable and tagged variable
- Filter deleted assets in
processAdditionalAssetshook - HMR failure in defer module
- Emit assets even if invalidation occurs again
- Export types for serialization and deserialization in plugins and export the
ModuleFactoryclass - Fixed the failure export of internal function for ES module chunk format
- Fixed
GetChunkFilenamefailure caused bydependOnentry - Fixed the import of missing dependency chunks
- Fixed when entry chunk depends on the runtime chunk hash
- Fixed
module.exportsbundle to ESM library - Adjusted the time of adding a group depending on the fragment of execution time
- Fixed circle dependencies when require
RawModuleand condition ofisDeferred - Tree-shakable module library should align preconditions of
allowInlineStartup - Fixed concatenate optimization for ESM that caused undefined export
- Respect the
output.environment.nodePrefixForCoreModulesoption everywhere - Respect the
output.importMetaNameoption everywhere - Fixed await async dependencies when accepting them during HMR
- Better typescript types
- Added colors helpers for CLI
- Enable tree-shaking for ESM external modules with named imports
- Added the
deferImportoption to parser options - Fixed a regression in module concatenation after implementing deferred import support
- Fixed a potential performance issue in CleanPlugin
- Avoid extra
requirein some places - Keep consistent CSS order
- Dependency without the source order attribute must keep their original index
- Keep module traversal consistent across reexport scenarios
- Extend
importPhasesPluginonly when enabledeferImport(#19689) - Tree-shaking unused ignored modules
- [Types] Compatibility with old Node.js versions
- 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
- HMR support for ES modules output
- ES module output mode now fully supports
splitChunkswhen external variables and runtimeChunk are not set. - Added support
usingkeyword - 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 - Remove useless startup entrypoint runtime for ES modules output
- Cache
new URL(...)evaluate expression - 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
- Fixed type error with latest
@types/node - Don't skip export generation for
defaultreexport (#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
causeof any errors anderrorsof AggregateError in stats output - Added missing
@types/json-schemain types - Respect public path for ES modules
- Fixed generation of module for
modulelibrary when mixing commonjs and esm modules - Always apply
FlagDependencyExportsPluginfor libraries where it required - Faster logic for dead control flow
- Control dead flow for labeled and blockless statements
- Fixed terminated state for
if/else - Fixed dead control flow with deep nested
if/else - Dead control flow for exotic cases
- Dead control flow for many cases
- 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
moduleandmoduleESM 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-staticlibrary - Forward semicolons from
meta.webpackAST - Use
xxhash64forcache.hashAlgorithmwhenexperiments.futureDefaultsenabled - [CSS] Fixed profiling plugin for CSS
- [CSS] Avoid extra module.export output for CSS module
- 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
- Fixed excessive calls of getAllReferences
- Optimize loc for monomorphic inline caching
- Switch on
stricttypes fortypescript - 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
filenameTemplatein 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.charseteverywhere #19202 by @alexander-akait - Node async WASM loader generation #19210 by @ashi009
- Correct
BuildInfoandBuildMetatype definitions #19200 by @inottn - Improve
FlagDependencyExportsPluginfor large JSON by depth #19058 by @hai-x - Optimize assign-depths #19193 by @dmichon-msft
- Use
startsWithfor matching instead of converting the string to a regex #19207 by @inottn - Bump
nanoidfrom 3.3.7 to 3.3.8 #19063 by @dependabot - Fixed incorrect typecast in
DefaultStatsFactoryPlugin#19156 by @Andarist - Improved
readme.mdby adding video links for understanding webpack #19101 by @Vansh5632 - Typo fix #19205 by @hai-x
- Adopt the new webpack governance model #18804 by @ovflowd
- Implement
/* webpackIgnore: true */forrequire.resolve#19201 by @alexander-akait - CI fix #19196 by @alexander-akait
- @Andarist made their first contribution in #19156
- @Vansh5632 made their first contribution in #19101
- @ashi009 made their first contribution in #19210
- @ovflowd made their first contribution in #18804
- Performance regression
- Sub define key should't be renamed when it's a defined variable
- Don't crash with filesystem cache and unknown scheme
- Generate a valid code when
output.iifeistrueand 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]tolocalIdentNamewhen it is empty - [CSS] Parsing strings on Windows
- [CSS] Fixed CSS local escaping
- Added support for injecting debug IDs
- Export the
MergeDuplicateChunksplugin - 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.cssHeadDataCompressionoption was deleted - [CSS] Added universal loading for CSS chunks
- [CSS] Parse ICSS
@valueat-rules in CSS modules - [CSS] Parse ICSS
:importrules in CSS modules - [CSS] Added the
urlandimportoptions for CSS - [CSS] Allow to import custom properties in CSS modules
- Faster Queue implementation, also fixed queue iterator state in dequeue method to ensure correct behavior after item removal
- [Types] Add
@types/eslint-scopeto dependencieS - [Types] Fixed regression in
validate - 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.dynamicImportto 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
importModuleon the execution stage - Correctly parsing string in
exportandimport - [CSS]
css/autoconsiders a module depending on its filename ascss(pure CSS) orcss/local, before it wascss/globalandcss/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
nodetarget - [CSS] Fixed
url()s and@importparsing - [CSS] Fixed - emit a warning on broken :local and :global
- 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
- Fixed hanging when attempting to read a symlink-like file that it can't read
- Handle
defaultfor 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
moduleandimportinmodule-importfor externalsimport's - [Types] Make
EnvironmentPlugindefault values types less strict - [Types] Typescript 5.6 compatibility
- Add new
optimization.avoidEntryIifeoption (trueby default for theproductionmode) - Pass output.hash* options to loader context
- Avoid unneeded re-visit in build chunk graph
webpack/webpack (webpack)
v5.104.1
Patch Changes
2efd21b: Reexports runtime calculation should not accessing WEBPACK_IMPORT_KEY decl with var.c510070: Fixed a user information bypass vulnerability in the HttpUriPlugin plugin.
v5.104.0
Minor Changes
d3dd841: Use method shorthand to render module content in__webpack_modules__object.d3dd841: Enhanceimport.meta.envto support object access.4baab4e: Optimize dependency sorting in updateParent: sort each module only once by deferring to finishUpdateParent(), and reduce traversal count in sortWithSourceOrder by caching WeakMap values upfront.04cd530: Handle more at-rules for CSS modules.cafae23: Added options to control the renaming of at-rules and various identifiers in CSS modules.d3dd841: Addedbase64url,base62,base58,base52,base49,base36,base32andbase25digests.5983843: Provide a stable runtime function variable__webpack_global__.d3dd841: ImprovedlocalIdentNamehashing for CSS.
Patch Changes
22c48fb: Added module existence check for informative error message in development mode.50689e1: Use the fully qualified class name (or export name) for[fullhash]placeholder in CSS modules.d3dd841: Support universal lazy compilation.d3dd841: Fixed module library export definitions when multiple runtimes.d3dd841: Fixed CSS nesting and CSS custom properties parsing.d3dd841: Don't write fragment from URL to filename and apply fragment to module URL.aab1da9: Fixed bugs forcss/globaltype.d3dd841: Compatibilityimport.meta.filenameandimport.meta.dirnamewithevaldevtools.d3dd841: Handle nested__webpack_require__.728ddb7: The speed of identifier parsing has been improved.0f8b31b: Improve types.d3dd841: Don't corruptdebugIdinjection whenhidden-source-mapis used.2179fdb: Re-validate HttpUriPlugin redirects against allowedUris, restrict to http(s) and add a conservative redirect limit to prevent SSRF and untrusted content inclusion. Redirects failing policy are rejected before caching/lockfile writes.d3dd841: SerializeHookWebpackError.d3dd841: Added ability to use built-in properties in dotenv and define plugin.3c4319f: Optimizing the regular expression character class by specifying ranges for runtime code.d3dd841: Reduce collision for local indent name in CSS.d3dd841: Remove CSS link tags when CSS imports are removed.
v5.103.0
Features
- Added
DotenvPluginand top leveldotenvoption to enable this plugin - Added
WebpackManifestPlugin - Added support the
ignoreListoption in devtool plugins - Allow to use custom javascript parse function
- Added
import.meta.envsupport for environment variables - Added support for
import.meta.dirnameandimport.meta.filename - Added support
import.defer()for statistical path - Handle import.meta.main
- Added suport to setup named exports for JSON modules and disable usage named export for
import file from "./file.json" with { type: "json" } - Added support
__dirname/__filename/import.meta.dirname/import.meta.filenamefor universal target - [CSS] Added the
exportTypeoption withlink(by default), "text" andcss-style-sheetvalues - [CSS] Added support for
composesproperties
Fixes
- The
dependOnchunk must be loaded before the common chunk - Return to namespace import when the external request includes a specific export
- No runtime extra runtime code for module libraries
- Delay HMR accept dependencies to preserve import attributes
- Properly handle external presets for universal target
- Fixed incorrect identifier of import binding for module externals
- Fixed when defer import and dynamic default export mixed
- Reduce generated output when
globalThissupported - Fixed loading async modules in defer import
- Reexport module for default import when no used exports for systemjs library
- Rename HarmonyExportDependencyParserPlugin exported id to CompatibilityPlugin tagged id
- Handle
__dirnameand__filenamefor ES modules - Rename single nested
__webpack_export__and__webpack_require__in already bundled code - [Types] webpack function type
- [Types] NormalModule type
- [Types] Multi compiler configuration type
- [Types] Fixed regression in custom
hashDigesttype - [CSS] No extra runtime for initial chunk
- [CSS] Fixed a lot of CSS modules bugs
v5.102.1
Fixes
- Supported
extendswithenvforbrowserslist - Supported
JSONPfragment format for web workers. - Fixed dynamic import support in workers using
browserslist. - Fixed default defer import mangling.
- Fixed default import of
commonjsexternals forSystemJSformat. - Fixed context modules to the same file with different import attributes.
- Fixed typescript types.
- Improved
import.metawarning messages to be more clear when used directly. - [CSS] Fixed CC_UPPER_U parsing (E -> U) in tokenizer.
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.contextModuleto configure snapshots options for context modules - Added the
extractSourceMapoption to implement the capabilities of loading source maps by comment, you don't needsource-map-loader(look at example) - The
topLevelAwaitexperiment is now stable (you can removeexperiments.topLevelAwaitfrom yourwebpack.config.js) - The
layersexperiment is now stable (you can removeexperiments.layersfrom 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
thisexports - Removed unused
timeoutattribute of script tag - Supported UMD chunk format to work in web workers
- Improved CommonJs bundle to ES module library
- Use
es-lexerformjsfiles for build dependencies - Fixed support
__non_webpack_require__for ES modules - Properly handle external modules for CSS
- AssetsByChunkName included assets from
chunk.auxiliaryFiles - Use
createRequireonly 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
processAdditionalAssetshook - HMR failure in defer module
- Emit assets even if invalidation occurs again
- Export types for serialization and deserialization in plugins and export the
ModuleFactoryclass - Fixed the failure export of internal function for ES module chunk format
- Fixed
GetChunkFilenamefailure caused bydependOnentry - Fixed the import of missing dependency chunks
- Fixed when entry chunk depends on the runtime chunk hash
- Fixed
module.exportsbundle to ESM library - Adjusted the time of adding a group depending on the fragment of execution time
- Fixed circle dependencies when require
RawModuleand 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.nodePrefixForCoreModulesoption everywhere - Respect the
output.importMetaNameoption 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
deferImportoption 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
requirein 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
importPhasesPluginonly 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
splitChunkswhen external variables and runtimeChunk are not set. - Added support
usingkeyword - 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
defaultreexport (#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
causeof any errors anderrorsof AggregateError in stats output - Added missing
@types/json-schemain types
v5.99.6
Fixes
- Respect public path for ES modules
- Fixed generation of module for
modulelibrary when mixing commonjs and esm modules - Always apply
FlagDependencyExportsPluginfor 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
moduleandmoduleESM 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-staticlibrary - Forward semicolons from
meta.webpackAST - Use
xxhash64forcache.hashAlgorithmwhenexperiments.futureDefaultsenabled - [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
stricttypes 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
filenameTemplatein 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.charseteverywhere #19202 by @alexander-akait - Node async WASM loader generation #19210 by @ashi009
- Correct
BuildInfoandBuildMetatype definitions #19200 by @inottn
Performance Improvements
- Improve
FlagDependencyExportsPluginfor large JSON by depth #19058 by @hai-x - Optimize assign-depths #19193 by @dmichon-msft
- Use
startsWithfor matching instead of converting the string to a regex #19207 by @inottn
Chores
- Bump
nanoidfrom 3.3.7 to 3.3.8 #19063 by @dependabot - Fixed incorrect typecast in
DefaultStatsFactoryPlugin#19156 by @Andarist - Improved
readme.mdby 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 #19156
- @Vansh5632 made their first contribution in #19101
- @ashi009 made their first contribution in #19210
- @ovflowd made their first contribution in #18804
Full Changelog: webpack/webpack@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.iifeistrueand 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]tolocalIdentNamewhen it is empty - [CSS] Parsing strings on Windows
- [CSS] Fixed CSS local escaping
New Features
- Added support for injecting debug IDs
- Export the
MergeDuplicateChunksplugin - 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.cssHeadDataCompressionoption was deleted - [CSS] Added universal loading for CSS chunks
- [CSS] Parse ICSS
@valueat-rules in CSS modules - [CSS] Parse ICSS
:importrules in CSS modules - [CSS] Added the
urlandimportoptions 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-scopeto 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.dynamicImportto 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
importModuleon the execution stage - Correctly parsing string in
exportandimport - Typescript types
- [CSS]
css/autoconsiders a module depending on its filename ascss(pure CSS) orcss/local, before it wascss/globalandcss/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
nodetarget - [CSS] Fixed
url()s and@importparsing - [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
defaultfor 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
moduleandimportinmodule-importfor externalsimport's - [Types] Make
EnvironmentPlugindefault values types less strict - [Types] Typescript 5.6 compatibility
New Features
- Add new
optimization.avoidEntryIifeoption (trueby default for theproductionmode) - Pass output.hash* options to loader context
Performance
- Avoid unneeded re-visit in build chunk graph
List of commits
b2eab07 (Update dependency webpack to v5.104.1 [SECURITY], 2026-02-07)