Skip to content

fix(web): replace deprecated $app/environment with $app/env in SvelteKit integration - #214

Closed
aynavbar wants to merge 1 commit into
vercel:mainfrom
aynavbar:patch-1
Closed

aynavbar wants to merge 1 commit into
vercel:mainfrom
aynavbar:patch-1

Conversation

@aynavbar

@aynavbar aynavbar commented Oct 2, 2026 •

Copy link
Copy Markdown

Replaces the $app/environment import in packages/web/src/sveltekit/index.ts with $app/env.

$app/environment was deprecated in SvelteKit 3 in favor of $app/env and is scheduled for removal in SvelteKit 4:
https://svelte.dev/docs/kit/$app-environment

Migrating now avoids a deprecation warning for SvelteKit 3 users and a breaking import when v4 lands (though it's already breaking my prod build). New module reference: https://svelte.dev/docs/kit/$app-env

Changes

  • packages/web/src/sveltekit/index.ts: import [browser/dev/etc.] from $app/env instead of $app/environment

Compatibility note

  • This package still supports SvelteKit 2, where $app/env may not exist. I'd appreciate guidance on whether to bump the peer range, wait, or support both.

Related

I also sent feedback through the docs page, which shows the same outdated import.

@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

@aynavbar is attempting to deploy a commit to the Analytics Test Projects Team on Vercel.

A member of the Team first needs to authorize it.

@Rich-Harris Rich-Harris mentioned this pull request Oct 5, 2026
@aynavbar aynavbar closed this Oct 6, 2026
@aynavbar
aynavbar deleted the patch-1 branch October 7, 2026 04:09
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