Skip to content

fix(qwik): emit valid @__PURE__ annotations from the minified dist build - #8908

Merged
maiieul merged 1 commit into
mainfrom
chore/dist-build-esbuild-minify
Aug 5, 2026
Merged

fix(qwik): emit valid @__PURE__ annotations from the minified dist build#8908
maiieul merged 1 commit into
mainfrom
chore/dist-build-esbuild-minify

Conversation

@maiieul

@maiieul maiieul commented Aug 3, 2026

Copy link
Copy Markdown
Member

What is it?

  • Bug

Description

Terser moves some __PURE__ annotations away from the call they belong to, so bundlers can't
attach them and silently drop the hint. Bundling our dist with rolldown reports 6
INVALID_ANNOTATION today and 0 after this change, which means apps get the tree-shaking those
annotations were supposed to buy. Same approach as #8379: keep terser and repair the two patterns
it strands — an annotation hoisted in front of a return, and one left in front of a "" + fn
concatenation after terser rewrites fn.toString(). Widened to match both the @ and #
spellings, since terser emits both. No size change; output is byte-for-byte main plus the repair.

Split out of #8785 so it can land on its own.

@maiieul
maiieul requested a review from a team as a code owner August 3, 2026 15:37
@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cbbfaed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@qwik.dev/core Patch
eslint-plugin-qwik Patch
@qwik.dev/react Patch
@qwik.dev/router Patch
create-qwik Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@maiieul maiieul self-assigned this Aug 3, 2026
@maiieul maiieul moved this to Waiting For Review in Qwik Development Aug 3, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8908

@qwik.dev/router

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8908

eslint-plugin-qwik

npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8908

create-qwik

npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8908

@qwik.dev/optimizer

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/optimizer@8908

@qwik.dev/devtools

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/devtools@8908

commit: cbbfaed

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview cbbfaed

Terser moved annotations away from the calls they belong to, so bundlers could
not attach them and dropped the hints — 6 INVALID_ANNOTATION on the dist output,
now 0.
@maiieul
maiieul force-pushed the chore/dist-build-esbuild-minify branch from ee8e607 to cbbfaed Compare August 4, 2026 04:35
@maiieul
maiieul requested a review from wmertens August 4, 2026 04:53
@maiieul
maiieul merged commit e0f6fbc into main Aug 5, 2026
48 checks passed
@maiieul
maiieul deleted the chore/dist-build-esbuild-minify branch August 5, 2026 13:26
@github-project-automation github-project-automation Bot moved this from Waiting For Review to Done in Qwik Development Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants