Skip to content

fix: prevent cold dev route loader requests from failing during SPA - #8787

Merged
wmertens merged 1 commit into
build/v2from
v2-undefined-loader-dev
Jul 1, 2026
Merged

wmertens merged 1 commit into
build/v2from
v2-undefined-loader-dev

Conversation

@Varixo

@Varixo Varixo commented Jul 1, 2026

Copy link
Copy Markdown
Member

In dev, the first SPA navigation to a cold route could request route loader data before the route-local loader metadata was fully available. This made q-loader requests fail with "Loader not found" / empty responses, especially for catchall routes or loaders not visible as direct route module exports. This PR adds a dev-only route loader registry so loader objects created during module evaluation can still be resolved by id for cold q-loader requests. It also keeps dev prefetch disabled to avoid speculative q-loader requests before dev metadata has settled.

@Varixo Varixo self-assigned this Jul 1, 2026
@Varixo
Varixo requested a review from a team as a code owner July 1, 2026 17:08
@Varixo Varixo added the V2 label Jul 1, 2026
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7244e3e

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/router Patch
eslint-plugin-qwik Patch
@qwik.dev/core Patch
create-qwik Patch
@qwik.dev/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 from Backlog to Waiting For Review in Qwik Development Jul 1, 2026
@Varixo Varixo changed the title fix: prevent cold dev route loader requests from failing during SPA n… fix: prevent cold dev route loader requests from failing during SPA Jul 1, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

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

@qwik.dev/router

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

eslint-plugin-qwik

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

create-qwik

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

@qwik.dev/optimizer

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

commit: 7244e3e

@github-actions

github-actions Bot commented Jul 1, 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 7244e3e

@wmertens wmertens 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.

LGTM 🕺

@wmertens
wmertens merged commit 6b56705 into build/v2 Jul 1, 2026
49 checks passed
@wmertens
wmertens deleted the v2-undefined-loader-dev branch July 1, 2026 17:38
@github-project-automation github-project-automation Bot moved this from Waiting For Review to Done in Qwik Development Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants