Skip to content

feat(website): TanStack Router as a live go-web example + in-card web bridge - #17

Open
Huxpro wants to merge 1 commit into
claude/tsr-03-mpa-codegenfrom
claude/tsr-04-website-goweb
Open

feat(website): TanStack Router as a live go-web example + in-card web bridge#17
Huxpro wants to merge 1 commit into
claude/tsr-03-mpa-codegenfrom
claude/tsr-04-website-goweb

Conversation

@Huxpro

@Huxpro Huxpro commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Stacked PR 4/5 (base: tsr-03-mpa-codegen). Surfaces the MPA demo on the website as a live <Go> example, and makes cross-page navigation render in the browser preview.

📚 Stack (review bottom → top)

  1. tsr-01-sparkling-history — router-agnostic web-history shim
  2. tsr-02-reactlynx-spike — prove TanStack Router runs on ReactLynx
  3. tsr-03-mpa-codegen — file-based routing + native MPA + codegen
  4. 👉 tsr-04-website-goweb — go-web example + in-card web bridge (this PR)
  5. tsr-05-docs-guide — design guide + support matrix + RN comparison

Related issues

Standalone. Depends on PRs 1–3.

Changes

  • lynx.web.config.ts: a website-only build emitting *.web.bundle (in-browser preview) and *.lynx.bundle (QR / on-device); points assetPrefix at the deployed examples path; writes to dist-web/ so the native dist/ is safe.
  • src/web-nav/setup.ts (native no-op) + setup.web.ts (web): a go-web card renders one bundle and can't swap to another native page, so the web variant registers the sparkling router.open/close web methods and points their host at THIS card — rendering the cross-page destination in-page (the bundle carries the whole route tree). Selected via the React-Native-style .web.ts extension.
  • website/scripts/prepare-examples.mjs: build the demo's workspace deps before its web bundle (their dist/ is gitignored) so the example builds on a fresh Vercel checkout; register the explicit spike/home entries.
  • rspress.config.ts + docs/guide/examples*: add the example to the Examples sidebar/overview and an example page with two <Go> embeds.

Note: the example page links to /guide/tanstack-router (the design guide), which lands in PR 5/5 — that sidebar/link resolves once the top of the stack merges.

How to test

pnpm --filter tanstack-router-demo build:web   # builds workspace deps, then spike/home .web.bundle

Then locally: pnpm -C packages/website dev and open /guide/examples/tanstack-router — tap Detail tiktok#42 to see the cross-page route render in-card.

Checklist

  • I ran relevant checks (build:web; verified live in the <Go> preview)
  • I updated docs/examples (example page + sidebar)
  • Design guide lands in PR 5/5

🤖 Generated with Claude Code

https://claude.ai/code/session_01H1EU55YA4e1zj2oVHh7Zme


Generated by Claude Code

… bridge

Surface the MPA demo on the website as a live <Go> example, and make cross-page
navigation render in the browser preview.

- lynx.web.config.ts: a website-only build that emits *.web.bundle (in-browser
  preview) and *.lynx.bundle (QR / on-device), points assetPrefix at the
  deployed examples path, and writes to dist-web/ so the native dist/ is safe.
- src/web-nav/setup.ts (native no-op) + setup.web.ts (web): a go-web card renders
  one bundle and cannot swap to another native page, so the web variant registers
  the sparkling router.open/close web methods and points their host at THIS card,
  rendering the cross-page destination in-page (the bundle carries the whole
  route tree). Selected via the React-Native-style `.web.ts` extension.
- website/scripts/prepare-examples.mjs: build the demo's workspace deps before
  its web bundle (their dist/ is gitignored) so the example builds on a fresh
  Vercel checkout; register the explicit spike/home entries.
- rspress.config.ts + docs/guide/examples*: add the example to the Examples
  sidebar/overview and an example page with two <Go> embeds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H1EU55YA4e1zj2oVHh7Zme
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sparkling Error Error Jul 13, 2026 1:31pm

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