Skip to content

fix(qwik-city): check all bundle origins for route imports#8455

Merged
Varixo merged 1 commit into
mainfrom
codex/fix-route-bundle-matching-logic
Mar 20, 2026
Merged

fix(qwik-city): check all bundle origins for route imports#8455
Varixo merged 1 commit into
mainfrom
codex/fix-route-bundle-matching-logic

Conversation

@Varixo
Copy link
Copy Markdown
Member

@Varixo Varixo commented Mar 20, 2026

Motivation

  • A helper used to decide if a manifest bundle belongs to a route returned inside the origins loop, so only the first origin was evaluated and bundles with a matching origin later in the list could be omitted.
  • This led to incomplete route-to-bundle mappings and missing prefetch dependencies for some routes.

Description

  • Replace the early return inside the for loop with bundle.origins.some(...) in packages/qwik-city/src/buildtime/vite/get-route-imports.ts so every origin is checked before deciding membership.
  • Add a regression unit test in packages/qwik-city/src/buildtime/vite/get-route-imports.unit.ts that verifies bundles with multiple origins are included when a later origin matches the route.
  • Add a patch changeset .changeset/few-geese-approve.md for @builder.io/qwik-city to document the fix.

Testing

  • Verified the corrected matching logic with a small node snippet that exercises the multi-origin case and returned the expected true result.
  • Attempted to run the unit test via pnpm vitest run packages/qwik-city/src/buildtime/vite/get-route-imports.unit.ts, but the run failed in this environment due to Node version mismatch (Got: v20.19.6, repo requires >=22.18.0), so the added test could not be executed here.

Codex Task

@Varixo Varixo requested a review from a team as a code owner March 20, 2026 17:01
@Varixo Varixo added the codex label Mar 20, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: 8643894

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

This PR includes changesets to release 5 packages
Name Type
@builder.io/qwik-city Patch
eslint-plugin-qwik Patch
@builder.io/qwik Patch
create-qwik Patch
@builder.io/qwik-react 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 moved this to Waiting For Review in Qwik Development Mar 20, 2026
@Varixo Varixo merged commit df2d774 into main Mar 20, 2026
12 of 25 checks passed
@Varixo Varixo deleted the codex/fix-route-bundle-matching-logic branch March 20, 2026 17:14
@github-project-automation github-project-automation Bot moved this from Waiting For Review to Done in Qwik Development Mar 20, 2026
@github-actions github-actions Bot mentioned this pull request May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants