Skip to content

chore: read the Svelte config via @sveltejs/load-config - #17039

Merged
teemingc merged 1 commit into
version-3from
chore/package-load-config
Sep 4, 2026
Merged

chore: read the Svelte config via @sveltejs/load-config#17039
teemingc merged 1 commit into
version-3from
chore/package-load-config

Conversation

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

packages/package/src/config.js has its own resolveConfig + find-plugin loader, with import_peer and resolve_peer copied alongside it. It resolves under 'build', so reading the config runs the full sync.all and needs src/app.html, and it makes vite mandatory even for a library that only has a svelte.config.js.

Use @sveltejs/load-config instead. It resolves under 'serve' and falls back to svelte.config.js when the Vite config has no Svelte plugin.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 4, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 2f4098f:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/2f4098f61d07e1235c73e30dd501ac0a58e74992

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

@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2f4098f

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

@svelte-docs-bot

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: QUIET

Plan: Advanced

Run ID: 5c9884d6-a925-4802-a9cf-a999d1326690

📥 Commits

Reviewing files that changed from the base of the PR and between ee2f55b and 2f4098f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • .changeset/package-load-config.md
  • packages/package/package.json
  • packages/package/src/config.js
  • packages/package/test/fixtures/svelte-kit/src/app.html
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • sveltejs/vite-plugin-svelte (manual)
  • vitejs/vite (manual)
  • sveltejs/svelte (manual)
💤 Files with no reviewable changes (1)
  • packages/package/test/fixtures/svelte-kit/src/app.html

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

@sveltejs/package now uses @sveltejs/load-config to load Svelte configuration from the current working directory. Loader errors are thrown, and an empty configuration is returned when no configuration is found. The previous Vite production configuration loading and SvelteKit plugin lookup were removed. The package now declares the loader as a runtime dependency and includes a Changesets patch release entry.

Merge Risk: ⚪ Minimal · up to 2f409

@sveltejs/package now loads Svelte configuration through @sveltejs/load-config, supports projects with only svelte.config.js, and no concrete current-head merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required chore: prefix and accurately describes the change to read the Svelte configuration via @sveltejs/load-config.
Backward Compatibility Impact Disclosure ✅ Passed No breaking public interface is introduced. config.js retains both exported functions, and the package exports map is unchanged. The supported configuration fields in types.d.ts remain unchanged…

Comment @coderabbitai help to get the list of available commands.

@teemingc teemingc added the pkg:svelte-package Issues related to svelte-package label Sep 4, 2026
@teemingc
teemingc merged commit c47be02 into version-3 Sep 4, 2026
40 checks passed
@teemingc
teemingc deleted the chore/package-load-config branch September 4, 2026 18:36
@teemingc teemingc linked an issue Sep 4, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:svelte-package Issues related to svelte-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants