Skip to content

fix(website): render the changelog after a client-side navigation - #24

Merged
diecodev merged 1 commit into
v2from
fix/changelog-client-render
Oct 30, 2026
Merged

diecodev merged 1 commit into
v2from
fix/changelog-client-render

Conversation

@diecodev

Copy link
Copy Markdown
Owner

In production, going to /docs/changelog/ through a <Link> (the header, the sidebar, the version menu) leaves the page empty. The same happens when you click a filter after loading the page directly. Opening the URL directly works, because that HTML is prerendered.

Cause

Since the move to Vite 8 (#23), the release notes and the changelog page ended up in two client chunks that import each other. Rolldown places shared modules differently from Rollup.

  • The browser loads the page's component through the notes chunk.
  • The page's chunk runs first, and it built the version list at module level.
  • At that point the notes binding (a var) was still undefined, so the build threw TypeError: Cannot read properties of undefined (reading '2.0.0-beta.3').

Fix

  • The page reads __RELEASES__ in its own module. The separate release-notes.ts is gone, and with it the import cycle.
  • It builds the version list when it renders, not when the module loads, so it also holds up if Rolldown creates a cycle in the future.

Checks

  • build.types, lint and the full SSG build pass in website/, and fmt.check passes.
  • On the built site, in chromium and webkit:
    • Navigating with <Link> through every page, including the changelog and the three v1 pages through the version menu, works with no console errors.
    • The changelog filter re-renders.
    • Three rounds in each browser.
  • Before the fix, the same check reproduced the production error in both browsers.

Reaching /docs/changelog/ through a <Link>, or using its filters, left the page empty: Rolldown put the release notes in a chunk that imports the changelog's chunk back, so the version list, built when the module loaded, read the notes before they were initialized ("Cannot read properties of undefined"). The page now reads the notes from its own module and builds the list when it renders.
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
qwik-sonner Ready Ready Preview Oct 30, 2026 3:58am UTC

@diecodev
diecodev added this pull request to stack #26 October 30, 2026 04:11
@diecodev
diecodev merged commit d037208 into v2 Oct 30, 2026
5 checks passed
@diecodev
diecodev deleted the fix/changelog-client-render branch October 30, 2026 04:23
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.

1 participant