Skip to content

docs(module): document module.parser.javascript.anonymousDefaultExportName#8242

Merged
alexander-akait merged 1 commit into
mainfrom
docs/anonymous-default-export-name
May 18, 2026
Merged

docs(module): document module.parser.javascript.anonymousDefaultExportName#8242
alexander-akait merged 1 commit into
mainfrom
docs/anonymous-default-export-name

Conversation

@bjohansebas

Copy link
Copy Markdown
Member

Summary

Webpack 5.107 introduces a new JS parser option (module.parser.javascript.anonymousDefaultExportName) that controls whether webpack sets .name to "default" on anonymous default-export functions and classes (per the ES spec).

The fix-up was added in 5.106 but the extra Object.defineProperty calls inflate bundles, so the option defaults to:

  • true for applications
  • false for libraries (when output.library is set)

Documents the option under module.parser.javascript in configuration/module.mdx.

Refs: webpack/webpack#20894

Test plan

  • Visual check of the new section
  • Verify the badge shows "5.107.0+"

Use of AI

Drafted with Claude under human review. The contributor verified each change against the upstream webpack PR before commit.

…tName

Webpack 5.107 introduces a new JS parser option that controls whether
webpack sets .name to "default" on anonymous default-export functions
and classes (per the ES spec). The fix-up was added in 5.106 but the
extra Object.defineProperty calls inflate bundles, so the option
defaults to true for applications and false for libraries (when
output.library is set). Documents the option under
module.parser.javascript.

Refs: webpack/webpack#20894
@vercel

vercel Bot commented May 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment May 17, 2026 2:20am

Request Review

@alexander-akait alexander-akait merged commit 9ef6664 into main May 18, 2026
10 checks passed
@alexander-akait alexander-akait deleted the docs/anonymous-default-export-name branch May 18, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants