Skip to content

docs: fix preview docs deployments - #15975

Merged
Rich-Harris merged 11 commits into
version-3from
update-explicit-env
Jun 7, 2026
Merged

docs: fix preview docs deployments#15975
Rich-Harris merged 11 commits into
version-3from
update-explicit-env

Conversation

@teemingc

@teemingc teemingc commented Jun 7, 2026

Copy link
Copy Markdown
Member

We need to update the explicit environment variables docs to solve the preview error deployment. It's looking for $app/environment types but they've been removed when we merged main in https://github.com/sveltejs/svelte.dev/actions/runs/27088756592/job/79948243995#step:10:25


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@teemingc
teemingc requested a review from Rich-Harris June 7, 2026 10:44
@teemingc teemingc added the documentation Improvements or additions to documentation label Jun 7, 2026
@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4824206

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

## Explicit environment variables

As of SvelteKit 2.62, you can opt into _explicit_ environment variables, in which case you instead import environment variables from these modules:
After following the setup below, they can be imported via the following modules:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's probably a better way to introduce $app/env explicit environment variables

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Documentation links to deleted $app-environment reference file, causing a broken link.

Fix on Vercel

@teemingc
teemingc marked this pull request as draft June 7, 2026 10:50
@svelte-docs-bot

Copy link
Copy Markdown

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestions:

  1. Documentation contains broken links to deleted $env-static-private reference file after SvelteKit 3 migration
  1. Documentation contains broken links to deleted $env-static-private reference file

Fix on Vercel

Comment thread documentation/docs/25-build-and-deploy/90-adapter-vercel.md Outdated
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
@teemingc

teemingc commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Requires merging sveltejs/svelte.dev#2031 to get the deployment working

@Rich-Harris

Copy link
Copy Markdown
Member

Gah, still failing — needs $app/env/private to be defined in the adapter-vercel docs, and the February 2024 'what's new' blog post links to a missing /docs/kit/$env-static-public...

@teemingc

teemingc commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Alright I've added the ambient type and restored the deleted pages. We can probably remove them when svelte.dev uses the version-3 branch as the default and add redirects to the server handle hook there

@Rich-Harris
Rich-Harris merged commit 78c6fc0 into version-3 Jun 7, 2026
3 checks passed
@Rich-Harris
Rich-Harris deleted the update-explicit-env branch June 7, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants