Skip to content

Add SvelteKit 3 support#204

Merged
feugy merged 4 commits into
canaryfrom
feugy/sveltekit-3-support
Jul 6, 2026
Merged

Add SvelteKit 3 support#204
feugy merged 4 commits into
canaryfrom
feugy/sveltekit-3-support

Conversation

@feugy

@feugy feugy commented Jul 3, 2026

Copy link
Copy Markdown
Member

🖖🏻 What's in there?

Adds SvelteKit 3 support via @vercel/analytics/sveltekit-next while keeping @vercel/analytics/sveltekit on the existing SvelteKit 2 integration.

Introduces a new test application for sveltekit@3, while preserving the previous SvelteKit app as sveltekit-old for SvelteKit 2 coverage.

🤺 How to test?

Ultimate test is to use the test apps:

Visit these apps with your devtools open on the network tab.
Click on the link to navigate away.
Check the payload of the POST to /insights/view: you'll see the pageview attributed to the correct route.

I also ran:

  • pnpm -F @vercel/analytics test
  • pnpm -F @vercel/analytics build
  • pnpm -F sveltekit check
  • pnpm -F sveltekit build
  • pnpm -F sveltekit-old check
  • pnpm -F sveltekit-old build

🔬 Notes to reviewers

This mirrors the SvelteKit 3 split from vercel/speed-insights#120: use $app/state in a new sveltekit-next export while preserving the stable SvelteKit 2 export based on $app/stores.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
analytics-astro Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-next15 Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-nextjs Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-nuxt Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-remix Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-sveltekit Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-sveltekit-old Ready Ready Preview, Comment Jul 6, 2026 2:17pm
analytics-vue Ready Ready Preview, Comment Jul 6, 2026 2:17pm

Request Review

@socket-security

socket-security Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​sveltejs/​adapter-vercel@​7.0.0-next.01001007494100
Addednpm/​@​sveltejs/​kit@​3.0.0-next.6991008198100
Addednpm/​@​sveltejs/​vite-plugin-svelte@​4.0.41001008193100
Addednpm/​vue@​3.5.391001009196100

View full report

@feugy

feugy commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

@teemingc If you want to have a look, here is the equivalent on web-analytics

Comment thread apps/sveltekit/src/routes/+layout.ts Outdated

@Rich-Harris Rich-Harris left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small question but otherwise LGTM!

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