Skip to content

docs(guides/tree-shaking): document #__NO_SIDE_EFFECTS__ annotation#8238

Merged
alexander-akait merged 1 commit into
mainfrom
docs/no-side-effects-annotation
May 18, 2026
Merged

docs(guides/tree-shaking): document #__NO_SIDE_EFFECTS__ annotation#8238
alexander-akait merged 1 commit into
mainfrom
docs/no-side-effects-annotation

Conversation

@bjohansebas
Copy link
Copy Markdown
Member

Summary

Webpack 5.107 supports the #__NO_SIDE_EFFECTS__ annotation from the compiler-notations-spec, letting authors mark function declarations as side-effect-free so calls can be tree-shaken when their return value is unused.

Adds a new subsection in guides/tree-shaking right after the existing /*#__PURE__*/ section, with the caveat that propagation is currently intra-module only (cross-module propagation is planned for a future release).

Refs: webpack/webpack#20775

Test plan

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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:32am

Request Review

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 17, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: bjohansebas / name: Sebastian Beltran (26b475a)

Webpack 5.107 supports the #__NO_SIDE_EFFECTS__ annotation from the
compiler-notations-spec, letting authors mark function declarations as
side-effect-free so calls can be tree-shaken when their return value is
unused. Adds a new subsection in the tree shaking guide right after the
existing /*#__PURE__*/ section, with the caveat that propagation is
currently intra-module only.

Refs: webpack/webpack#20775
@alexander-akait alexander-akait merged commit a6c595e into main May 18, 2026
9 checks passed
@alexander-akait alexander-akait deleted the docs/no-side-effects-annotation branch May 18, 2026 15:18
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