chore: update dependency webpack to ^5.107.0#11633
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.106.2→^5.107.0Release Notes
webpack/webpack (webpack)
v5.107.0Compare Source
Minor Changes
Add
module.generator.javascript.anonymousDefaultExportNameoption to control whether webpack sets.nameto"default"for anonymous default export functions and classes per ES spec. Defaults totruefor applications andfalsefor libraries (whenoutput.libraryis set) to avoid unnecessary bundle size overhead. Also extract anonymous default export.namefix-up into a shared runtime helper (__webpack_require__.dn), replacing repeated inlineObject.defineProperty/Object.getOwnPropertyDescriptorcalls with a single short call per module to reduce output size. (by @xiaoxiaojx in #20894)Support module concatenation (scope hoisting) for CSS modules with
text,css-style-sheet,style, andlinkexport types (by @xiaoxiaojx in #20851)The
generator.exportsConventionfunction form for CSS modules now acceptsstring[]in addition tostring. (by @alexander-akait in #20914)Add
linkInserthook toCssLoadingRuntimeModule.getCompilationHooks(compilation)so plugin developers can control where stylesheet<link>elements are inserted into the document. (by @alexander-akait in #20947)Add
CssModulesPlugin.getCompilationHooks(compilation).orderModuleshook. (by @alexander-akait in #20978)Add a
pureparser option forcss/moduleandcss/autotypes matchingpostcss-modules-local-by-default's pure mode: every selector must contain at least one local class or id, otherwise webpack emits a build error. (by @alexander-akait in #20946)Support CSS Modules
@valueidentifiers as@importURLs and insideurl()functions, e.g.@value path: "./other.css"; @​import path;and@value bg: "./image.png"; .a { background: url(bg); }(by @alexander-akait in #20925)Add experimental TypeScript support via
experiments.typescript: true(auto-enabled byexperiments.futureDefaults). Uses Node.js's built-inmodule.stripTypeScriptTypes(Node.js >= 22.6 with the stablemode: "strip"API, including Node.js 26) to transform.ts,.cts,.mts,data:text/typescript, anddata:application/typescriptmodules — no type checking, only erasable TypeScript (types, generics,import type, casts)..tsx/JSX and non-erasable syntax (enum,namespace, parameter-property constructors, decorator metadata) are NOT supported; use a TSX-capable loader (e.g.ts-loader,swc-loader) for those. (by @alexander-akait in #20964)Added an
experiments.htmlflag that reserves thehtmlmodule type for the first-class HTML entry-point support. (by @aryanraj45 in #20902)Preserve
defer/sourceimport phase keywords on external dependencies in ESM output, the same way import attributes are preserved. (by @alexander-akait in #20934)Support the
#__NO_SIDE_EFFECTS__annotation to mark functions as pure for better tree-shaking. (by @hai-x in #20775)Add
module.generator.html.extractfor HTML modules and the matchingoutput.htmlFilename/output.htmlChunkFilenamefilename templates (defaults derived fromoutput.filename/output.chunkFilenamewith.jsswapped for.html, mirroring the CSS pipeline). When extraction is on, the parsed and URL-rewritten HTML is emitted as a standalone.htmloutput file alongside the module's JavaScript export. (by @alexander-akait in #20979)Add
"module-sync"to defaultconditionNamesfor resolver defaults to align with Node.js, which exposes themodule-synccommunity condition for synchronously-loadable ESM. (by @alexander-akait in #20933)Patch Changes
Fix CSS modules
composessocomposes: foo from "./self.module.css"from insideself.module.cssno longer creates a duplicate module instance. Fix CSS modulescomposesparsing solocal()andglobal()function wrappers are tracked per class name. Fix CSS modulescomposes: ... from "<file>"so the composed files load in an order consistent with every rule's local composes order, instead of source first-appearance order. (by @alexander-akait in #20929)Avoid emitting the
__webpack_require__runtime in CSS bundles when all imported CSS modules were concatenated into the same scope. (by @alexander-akait in #20936)Recompute the CSS chunk's
[contenthash]and the rendered CSS bytes when an asset referenced byurl()/src()/string in CSS changes its hashed filename. (by @alexander-akait in #20938)Embed an inline
sourceMappingURLdata URI inside the CSS when theparser.exportTypeoption aretext,style, orcss-style-sheet. Also merge@imported CSS at build time fortextandcss-style-sheetexportTypes so the bundle ships a single accurate inline source map covering every contributing file. Map each generated CSS-module class export line in the JS bundle back to its selector position in the original CSS file (e.g.btn: "..."→.btn { ... }). (by @alexander-akait in #20886)Fix CSS modules deduplication so a
.module.<ext>file imported both directly (JS) and via icss (composes from/:import) becomes a single module instance. (by @alexander-akait in #20929)Preserve
@charsetat-rule when CSS modules useexportType: "text". (by @alexander-akait in #20912)Resolve
[hash]/[fullhash]placeholders inoutput.publicPathwhen generatingurl()references forexperiments.css. (by @alexander-akait in #20879)Fix HMR for concatenated CSS modules with
styleexportType by using stable per-module identifiers for injected style elements and tracking inner module IDs of concatenated modules in HMR records (by @xiaoxiaojx in #20911)Fix CSS Modules
@valueresolution when the same local name is imported from multiple modules. (by @alexander-akait in #20940)Fix
typeof ns.default/ns.default instanceof Xon a staticimport defer * as ns from "./mod"fordefault-onlyanddefault-with-namedexternal modules underoptimization.concatenateModules. The concatenated-module rewrite was collapsingns.defaultto the deferred-namespace proxy itself instead of routing through the optimized.agetter (which lazily evaluates the module and returns its default value), sotypeof ns.defaultobserved"object"(the proxy) rather than the type of the default. ThedynamicexportsType already used.acorrectly; default-only and default-with-named now match. (by @alexander-akait in #20910)Make
import defer * as nsmore spec-compliant:ns.x = valueno longer triggers module evaluation (per the TC39 import-defer[[Set]]algorithm), and the deferred namespace is now a distinct object from the eager namespace, with the same Deferred Module Namespace Exotic Object shared across defer-import call sites for the same module. (by @alexander-akait in #20913)Fixed spec deviations in the deferred namespace object returned by
__webpack_require__.z(import defer * as ns/import.defer(...)). (by @alexander-akait in #20910)Drop the
__webpack_require__,__webpack_require__.d, and__webpack_require__.oruntime helpers fromlibrary: { type: "module" }bundles when the on-demand exports source they were emitted for ends up dropped (e.g. a single concatenated entry without an IIFE). (by @alexander-akait in #20901)Resolve the static specifier of a dynamic
import()whose argument is a side-effect-freeSequenceExpression, e.g.import((1, 0, "./mod.js"))is now treated the same asimport("./mod.js")instead of being rejected as unresolvable. (by @alexander-akait in #20917)Stable shared module ids and runtime-chunk emission order. (by @imccausl in #20860)
Fix snapshot validity check for context dependencies in watch mode by treating watchpack's existence-only entries (
{}) as cache misses. (by @alexander-akait in #20916)Support no-expression template literals in computed member access (e.g.
import.meta[`url`]). (by @alexander-akait in #20889)Improve tree-shaking in
isPure: handle more expression types (ArrayExpression,ObjectExpression,NewExpression,ChainExpression,UnaryExpression(safe operators),MetaProperty,TaggedTemplateExpression,BinaryExpression(strict equality)), prevent/*#__PURE__*/comments from leaking acrossObjectExpressionproperties, and detect PURE comments insideTemplateLiteralinterpolations. (by @alexander-akait in #20723)Reject
new import.defer(...)andnew import.source(...)as a parse-timeSyntaxError, matching the spec —ImportCallis aCallExpressionand is not a valid operand ofnew. Parenthesized forms (new (import.defer(...))) remain valid and continue to throwTypeErrorat runtime as before. (by @alexander-akait in #20917)Escape
#characters that appear inside a path-shaped request's directory portion before passing the request to the resolver, so projects located in directories like/home/user/proj#1(and tools like webpack-dev-server that build entry requests with query strings) resolve correctly. The escape only kicks in when the request contains both a#in the path portion and a?query string — paths without a query keep their existing semantics. (by @alexander-akait in #20980)Silence unhandled rejection from the prefetch trigger when chunk loading fails. The
ensureChunkHandlers.prefetchruntime createdPromise.all(promises).then(...)whose result is discarded by__webpack_require__.e. If chunk loading rejected (e.g.chunkLoadTimeout), that dangling chain produced an unhandled rejection. Prefetch is best-effort, so a no-op rejection handler is now attached. (by @alexander-akait in #20898)Align
require()of an ES module with Node.js'srequire(esm)"module.exports"named-export convention. When CommonJSrequire()resolves to an ES module that exports a binding with the literal string name"module.exports"(e.g.export { value as "module.exports" }),require()now returns the value of that export instead of the module's namespace object — matching Node.js v22.12+/v23+ behavior and easing migration of dual ESM/CJS libraries that rely onmodule.exports = …. The unwrap applies to plainrequire(),require().foo, calls (require()(…)), destructuring, and to CJS wrappers likemodule.exports = require(esm)/exports.x = require(esm). (by @alexander-akait in #20981)Remove outdated
@types/eslint-scopepackage from dependencies. (by @alexander-akait in #20869)Fix
export *resolution when a star-reexported module re-exports a name back to the importer cyclically. Previously, in a graph whereadoesexport * from "./b"; export * from "./c";andbdoesexport { foo } from "./a";whilecprovides the actualfoobinding, webpack hoistedfoofrombintoa's namespace without per-name cycle detection — emitting a getter chain (a.foo→b.foo→a.foo) that threw "Maximum call stack size exceeded" at runtime. The TC39ResolveExportalgorithm requires the cyclic branch to return null and the star loop to fall through to the non-cyclic source. (by @alexander-akait in #20959)Preserve
usingdeclaration initializers when the inner graph optimization is enabled. (by @hai-x in #20906)Fixed typescript types. (by @alexander-akait in #20880)
Bump
webpack-sourcesto^3.4.1and feed asset bytes into hashes via the newSource.prototype.buffers()API. For largeConcatSource/ReplaceSourceoutputs this avoids the intermediateBuffer.concatthatsource.buffer()performs, removing a peak-memory spike equal to the source's total size on each hashed asset (AssetGenerator.getFullContentHash,CssIcssExportDependencycontent hashing, andRealContentHashPlugin). A small benchmark on a 64 MiBConcatSourceshows ~64 MiB lower peak external memory and ~45% faster hashing. (by @alexander-akait in #20897)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.