Skip to content

fix(router): correctly exclude prerendered routes from the SSR plan#8759

Merged
wmertens merged 1 commit into
QwikDev:build/v2from
briancarbone:fix/exclude-prerendered-ssr-resolution
Jun 21, 2026
Merged

fix(router): correctly exclude prerendered routes from the SSR plan#8759
wmertens merged 1 commit into
QwikDev:build/v2from
briancarbone:fix/exclude-prerendered-ssr-resolution

Conversation

@briancarbone

Copy link
Copy Markdown

No description provided.

@briancarbone briancarbone requested a review from a team as a code owner June 21, 2026 17:37
@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2914d2c

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

@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 enabled auto-merge June 21, 2026 17:38
auto-merge was automatically disabled June 21, 2026 17:46

Head branch was pushed to by a user without write access

@briancarbone briancarbone force-pushed the fix/exclude-prerendered-ssr-resolution branch from 80c1082 to 726f76e Compare June 21, 2026 17:46
@pkg-pr-new

pkg-pr-new Bot commented Jun 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@qwik.dev/core

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

@qwik.dev/router

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

eslint-plugin-qwik

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

create-qwik

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

@qwik.dev/optimizer

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

commit: 2914d2c

@briancarbone briancarbone force-pushed the fix/exclude-prerendered-ssr-resolution branch from 726f76e to e346875 Compare June 21, 2026 17:51
@github-actions

github-actions Bot commented Jun 21, 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 2914d2c

The server-route prune silently failed due to two compounding bugs, both
producing an empty exclusion set:

- The pruned plan used a query-suffixed virtual id
  (@qwik-router-config?ssr).  The optimizer strips the query before
  resolveId runs, so the request handler resolved the full plan and
  isSsrConfig was never true. Use a distinct query-less id
  (@qwik-router-config-ssr), consistent with the other router virtual
  modules (@qwik-router-entries, @qwik-router-sw-register).

- Server-free detection lexed raw route/layout source with
  es-module-lexer, which throws on JSX; the .catch fail-safe then marked
  every route server-bound. Swap to mlly's regex-based import/export
  scan, which is JSX-tolerant.

Add a JSX regression case to the unit tests.
@briancarbone briancarbone force-pushed the fix/exclude-prerendered-ssr-resolution branch from e346875 to 2914d2c Compare June 21, 2026 17:58
@wmertens wmertens merged commit 25572c2 into QwikDev:build/v2 Jun 21, 2026
48 checks passed
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