Skip to content

fix(qwik-vite): keep reachable deps when reducing cyclic bundle graphs - #8789

Draft
briancarbone wants to merge 1 commit into
QwikDev:mainfrom
briancarbone:fix/bundle-graph-cyclic-deps
Draft

fix(qwik-vite): keep reachable deps when reducing cyclic bundle graphs#8789
briancarbone wants to merge 1 commit into
QwikDev:mainfrom
briancarbone:fix/bundle-graph-cyclic-deps

Conversation

@briancarbone

Copy link
Copy Markdown
Contributor

No description provided.

@briancarbone
briancarbone requested a review from a team as a code owner July 2, 2026 16:37
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ecbce59

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

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

@qwik.dev/router

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

eslint-plugin-qwik

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

create-qwik

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

@qwik.dev/optimizer

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

@qwik.dev/devtools

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

commit: ecbce59

@github-actions

github-actions Bot commented Jul 2, 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 ecbce59

@maiieul maiieul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I removed this in my Vite 8 PR because that led to the same bug you faced I think. Your solution is better because it's more performant. Can you trim/remove the unnecessary comments and only keep what's critical to understand the code?

@briancarbone
briancarbone force-pushed the fix/bundle-graph-cyclic-deps branch from 2bb8a40 to 0553175 Compare July 2, 2026 19:23
@briancarbone

Copy link
Copy Markdown
Contributor Author

Should be better now

@briancarbone
briancarbone force-pushed the fix/bundle-graph-cyclic-deps branch 2 times, most recently from 98fbef5 to 0553175 Compare July 2, 2026 19:36
Per-bundle transitive reduction severed covering paths that ran back
through import cycles, collapsing cyclic bundles to zero preload deps (a
cold-nav chunk waterfall). Reduce via SCC condensation instead (shared
condenseImportGraph, also reused by computeTotals), so an import cycle
can't drop a still-reachable dependency.

Regression test: an x->a->x cycle keeps both a.js and d.js as deps of x.
@briancarbone
briancarbone force-pushed the fix/bundle-graph-cyclic-deps branch from 0553175 to ecbce59 Compare July 2, 2026 19:38
@briancarbone
briancarbone marked this pull request as draft July 3, 2026 20:37
@wmertens
wmertens changed the base branch from build/v2 to main July 16, 2026 14:50
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