Skip to content

feat(examples): vue-router-mpa — Vue Router driving Sparkling MPA navigation [stack 4/6] - #11

Open
Huxpro wants to merge 1 commit into
stack/3-sparkling-web-shellfrom
stack/4-example-vue-router-mpa
Open

feat(examples): vue-router-mpa — Vue Router driving Sparkling MPA navigation [stack 4/6]#11
Huxpro wants to merge 1 commit into
stack/3-sparkling-web-shellfrom
stack/4-example-vue-router-mpa

Conversation

@Huxpro

@Huxpro Huxpro commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Stacked PR 4/6 — base: stack/3-sparkling-web-shell (#10). Uses the adapter (#9) and is previewable via the web shell (#10).

Summary

Adds examples/vue-router-mpa, a Vue-Lynx example where Vue Router drives Sparkling multi-page native navigation via sparkling-history. Doubles as a go-web example (dual lynx+web build).

Related issues

Reference/validation app for #8/#9.

Changes

  • File-based pages src/pages/{main,users,settings} with per-page routes.json compiled into a route manifest by sparkling-history/codegen.
  • One createSparklingRouter() per bundle/heap; same-bundle navs stay in-heap (Home↔Features, dynamic /users/:id, per-route guards), cross-bundle navs (named routes, history.state, replace) open native containers.
  • Emits *.web.bundle + *.lynx.bundle; Home surfaces cross-nav failures inline (so a bridge-less preview shows why cross-page needs a device/harness).

How to test

pnpm --filter @sparkling-example/vue-router-mpa build
# preview full MPA flow:
LYNX_BUNDLE_DIR="$PWD/examples/vue-router-mpa/dist" pnpm --filter sparkling-web-shell dev

Checklist

  • I read CONTRIBUTING.md.
  • I linked a related issue (or explained why this is standalone).
  • I ran relevant checks (builds; verified push/back/replace/state in a browser).
  • I updated docs/examples (this IS the example + README).
  • Tests: exercised end-to-end via the web shell.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ARyWgB3243gQx1exWK61Qb


Generated by Claude Code

…igation

A Vue-Lynx example where Vue Router drives Sparkling multi-page native
navigation via sparkling-history. Doubles as a go-web example (dual lynx+web
build emitting *.web.bundle + *.lynx.bundle).

- file-based pages (src/pages/{main,users,settings}) with per-page routes.json
  compiled into a route manifest by sparkling-history/codegen
- one createSparklingRouter() per bundle/heap; same-bundle navigations stay
  in-heap (Home <-> Features, dynamic /users/:id, per-route guards), cross-bundle
  navigations (incl. named routes, history.state, replace) open native
  containers
- Home surfaces cross-nav failures inline so the go-web preview (which has no
  native bridge) shows why cross-page nav needs a device/harness

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ARyWgB3243gQx1exWK61Qb
@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 Ready Ready Preview, Comment Jul 13, 2026 1:18pm

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