Skip to content

fix: load inline SvelteKit config in svelte-package - #17030

Closed
svelte-triage-bot[bot] wants to merge 6 commits into
version-3from
triage/kit-17002-inline-package-config
Closed

fix: load inline SvelteKit config in svelte-package#17030
svelte-triage-bot[bot] wants to merge 6 commits into
version-3from
triage/kit-17002-inline-package-config

Conversation

@svelte-triage-bot

Copy link
Copy Markdown
Contributor

Summary

  • load Vite configuration during svelte-package
  • use Svelte options exposed by the sveltekit() plugin
  • preserve svelte.config.js/.ts fallback for legacy and non-Kit projects
  • resolve packaging config with production environment semantics
  • add regression coverage for inline preprocessing

Fixes #17002

Base branch

This fixes @sveltejs/package 2.x and should target main. The version-3
branch already loads configuration through Vite as part of its configuration changes.

Testing

  • pnpm --dir packages/package test
  • pnpm --dir packages/package check
  • pnpm --dir packages/package lint
  • pnpm -F @sveltejs/kit test:unit
  • pnpm format

teemingc and others added 6 commits August 6, 2026 12:10
Don't think these will run for us on the `version-3` branch unless
they're also on the `main` branch

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @sveltejs/kit@2.70.3

### Patch Changes

- fix: avoid eagerly reading `$app/state` dependencies during module
initialization

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elliott Johnson <hello@ell.iott.dev>
Co-authored-by: Conduitry <git@chor.date>
@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 3, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 334a3ae:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/334a3ae1cafad607126fcbdc4945d0b51db0b906

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/17030

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 334a3ae

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/package Patch

Not sure what this means? Click here to learn what changesets are.

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

@teemingc

teemingc commented Sep 3, 2026

Copy link
Copy Markdown
Member

@svelte-triage-bot can you delete the current branch and create a new branch based on the version-3 branch?

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

Should the replacement branch be empty at version-3, or should it retain/rebuild the intended svelte-package fix? Deleting and recreating the current same-named branch at version-3 would leave this PR with no diff.

  1. Empty replacement branch (same name) - Recreate triage/kit-17002-inline-package-config at the version-3 tip, preserving no commits; the current PR will have an empty diff.
  2. Reapply the intended fix - Rebuild only the intended svelte-package fix on a fresh branch based on version-3, excluding the unrelated changes.
  3. Create a separate replacement branch - Create a differently named branch at version-3 and leave the existing branch intact until the replacement is verified.

You can also reply with a custom answer.

Answer by mentioning me in a reply, e.g. @svelte-triage-bot Empty replacement branch (same name).

@teemingc

teemingc commented Sep 3, 2026

Copy link
Copy Markdown
Member

@svelte-triage-bot Reapply the intended fix

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

I verified that version-3 already contains the intended inline SvelteKit config behavior for svelte-package; a focused inline-preprocessor test and the package test suite passed.

I prepared the replacement locally at exactly the version-3 tip:

  • Branch: triage/kit-17002-inline-package-config
  • Commit: f269f58da5d9373319a9342e9fb9b883f83a61ec
  • Diff vs version-3: none
  • Old PR head preserved locally at backup/pr-17030-before-version-3-rebuild

However, I could not delete/recreate the remote branch: the bot identity was denied write access to sveltejs/kit-agent-sandbox (HTTP 403), so I did not attempt the destructive deletion. PR #17030 remains unchanged remotely.

With write access, these commands would perform the requested replacement:

git push agent --delete triage/kit-17002-inline-package-config
git push agent f269f58da5d9373319a9342e9fb9b883f83a61ec:refs/heads/triage/kit-17002-inline-package-config

That would leave the PR empty against version-3. Its title/body should then be updated or the PR closed, since the fix is already present on that branch.

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

Acknowledged. I’ve analyzed this interaction and recorded the findings in sveltejs/svelte-agent#4.

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

Acknowledged and incorporated into sveltejs/svelte-agent#4.

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

I’ve started the feedback analysis.

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@svelte-triage-bot

Copy link
Copy Markdown
Contributor Author

I’ve started the feedback analysis for this report.

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

2 similar comments
@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@dummdidumm

Copy link
Copy Markdown
Member

@svelte-triage-bot this went pretty bad. use the feedback subagent to analyse

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

Superseded by #17039 because version-3 already reads inline sveltekit() config.

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.

svelte-package ignores config passed to the sveltekit() Vite plugin

4 participants