chore(*): move Svelte config from 'svelte.config.js' into 'vite.config.ts' #12519
main fromrefs/pull/12519/head·merged by sukvvon(GitHub profile, opens in a new tab) 🎯 Changes#
SvelteKit 3 drops svelte.config.js in favor of passing options to sveltekit() in the Vite config (supported since 2.62). This moves the Svelte packages, examples and integrations to that form now.
- 13 SvelteKit examples and
integrations/svelte/sveltekit-2: removesvelte.config.jsand passpreprocess,adapter,typescriptandcompilerOptionstosveltekit()invite.config.ts. - 7 Vite-based Svelte examples and
integrations/svelte/vite: removesvelte.config.jsand passpreprocessandcompilerOptionstosvelte()invite.config.ts. svelte-query,svelte-query-devtoolsandsvelte-query-persist-client: removesvelte.config.jsand passpreprocessandcompilerOptionstosvelte()invite.config.ts.svelte-packageoutput is byte-identical without the config file, sincevitePreprocess()leaves<script lang="ts">untouched.eslint.config.jsin the packages and examples no longer imports the deleted config.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested code changes locally with
pnpm run test:pr, or these tests do not apply to this pull request. - I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
Summary by CodeRabbit#
- Chores
- Updated Svelte examples and packages to configure preprocessing and compiler options alongside their Vite setup.
- Consolidated Svelte configuration across the examples and packages, including SvelteKit adapter and TypeScript settings where applicable.
- 1
sukvvon(GitHub profile, opens in a new tab) assignedsukvvon
View your CI Pipeline Execution ↗ for commit f1028b400acb4541cf0acc233c52ea022aa414e2
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 3m 31s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded <1s View ↗
☁️ Nx Cloud last updated this comment at
2026-11-04 06:31:37UTC🚀 Changeset Version Preview#
5 package(s) bumped directly, 19 bumped as dependents.
🟩 Patch bumps#
Package Version Reason @tanstack/preact-query-devtools5.105.3 → 5.105.4 Changeset @tanstack/query-devtools5.105.3 → 5.105.4 Changeset @tanstack/react-query-devtools5.105.3 → 5.105.4 Changeset @tanstack/solid-query-devtools5.105.3 → 5.105.4 Changeset @tanstack/vue-query-devtools6.3.9 → 6.3.10 Changeset @tanstack/angular-query-experimental5.105.3 → 5.105.4 Dependent @tanstack/eslint-plugin-query5.105.3 → 5.105.4 Dependent @tanstack/lit-query0.2.34 → 0.2.35 Dependent @tanstack/preact-query5.105.3 → 5.105.4 Dependent @tanstack/preact-query-persist-client5.105.3 → 5.105.4 Dependent @tanstack/query-async-storage-persister5.105.3 → 5.105.4 Dependent @tanstack/query-broadcast-client-experimental5.105.3 → 5.105.4 Dependent @tanstack/query-core5.105.3 → 5.105.4 Dependent @tanstack/query-persist-client-core5.105.3 → 5.105.4 Dependent @tanstack/query-sync-storage-persister5.105.3 → 5.105.4 Dependent @tanstack/react-query5.105.3 → 5.105.4 Dependent @tanstack/react-query-next-experimental5.105.3 → 5.105.4 Dependent @tanstack/react-query-persist-client5.105.3 → 5.105.4 Dependent @tanstack/solid-query5.105.3 → 5.105.4 Dependent @tanstack/solid-query-persist-client5.105.3 → 5.105.4 Dependent @tanstack/svelte-query6.3.9 → 6.3.10 Dependent @tanstack/svelte-query-devtools6.3.9 → 6.3.10 Dependent @tanstack/svelte-query-persist-client6.3.9 → 6.3.10 Dependent @tanstack/vue-query5.105.3 → 5.105.4 Dependent No actionable comments were generated in the recent review.
Walkthrough
-
The Svelte examples, integrations, and packages move Svelte preprocessing and compiler options from
svelte.config.jsinto Vite configuration. SvelteKit configurations also move adapter and TypeScript include settings. ESLint configurations no longer import or passsvelte.config.js.Changes: Svelte configuration migration
Layer / File(s) Summary Standalone Svelte Vite configuration
examples/svelte/{algolia,basic-graphql-request,batching,chat,default-query-function,shadow-dom,simple}/*,packages/svelte-query*/*These projects configure Vite preprocessing and Svelte runes in the Svelte plugin options. They delete svelte.config.jsand remove its import and parser option from ESLint configuration.SvelteKit example configuration
examples/svelte/{auto-refetching-sveltekit,basic-sveltekit,infinite-query-with-max-pages-sveltekit,load-more-infinite-scroll-sveltekit,offline-sveltekit,optimistic-updates-sveltekit,pagination-sveltekit,playground-sveltekit,prefetching-sveltekit,rick-morty-sveltekit,ssr-sveltekit,star-wars-sveltekit,sveltekit}/*These examples configure preprocessing, the adapter, TypeScript includes, and Svelte runes through sveltekit(). They deletesvelte.config.jsand remove its import and parser option from ESLint configuration.Integration Vite configuration
integrations/svelte/sveltekit-2/*,integrations/svelte/vite/*The SvelteKit 2 integration passes preprocessing and adapter options to sveltekit(). The Vite integration passes preprocessing tosvelte(). Both deletesvelte.config.js.Estimated code review effort: 2 (Simple) | ~12 minutes
Possibly related PRs
- TanStack/query#12429: Adds Svelte examples whose configuration is migrated in this PR.
- TanStack/query#12430: Adds a SvelteKit example whose configuration is migrated here.
- TanStack/query#12507: Adds the SvelteKit 2 integration whose configuration is migrated here.
Suggested reviewers:
lachlancollins
Merge Risk:
Minimal · up tof1028-
The configuration migration has no established blocking regression and is mergeable subject to normal checks.
Pre-merge checks:
5-
Check name Status Explanation Title check The title clearly and concisely describes the main change: moving Svelte configuration from svelte.config.js into vite.config.ts. Description check The description explains the motivation, affected areas, configuration changes, testing status, AI policy, and release impact. It follows the required template and marks the applicable checklist items… Docstring Coverage No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Full details: Description check
-
Explanation
The description explains the motivation, affected areas, configuration changes, testing status, AI policy, and release impact. It follows the required template and marks the applicable checklist items.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 25 files.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: TanStack/query
- Branch: chore/move-svelte-config-to-vite-config
- File: .coderabbit.yaml
- Commit: f1028b4
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
54d11920-6900-45c7-b63d-39befdda19aa
Commits-
Reviewing files that changed from the base of the PR and between 95156ff82845504c8a12272328c4296bef72f29e and f1028b400acb4541cf0acc233c52ea022aa414e2.
Files selected for processing: 9-
packages/svelte-query-devtools/eslint.config.jspackages/svelte-query-devtools/svelte.config.jspackages/svelte-query-devtools/vite.config.tspackages/svelte-query-persist-client/eslint.config.jspackages/svelte-query-persist-client/svelte.config.jspackages/svelte-query-persist-client/vite.config.tspackages/svelte-query/eslint.config.jspackages/svelte-query/svelte.config.jspackages/svelte-query/vite.config.ts
Files with no reviewable changes: 3-
- packages/svelte-query-devtools/svelte.config.js
- packages/svelte-query/svelte.config.js
- packages/svelte-query-persist-client/svelte.config.js
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
-
More templates
- @tanstack/query-example-angular-auto-refetching
- @tanstack/query-example-angular-basic
- @tanstack/query-example-angular-basic-persister
- @tanstack/query-example-angular-devtools-panel-angular-router
- @tanstack/query-example-angular-infinite-query-with-max-pages
- @tanstack/query-example-angular-optimistic-updates
- @tanstack/query-example-angular-pagination
- @tanstack/query-example-angular-query-options-from-a-service-angular-router
- @tanstack/query-example-angular-router
- @tanstack/query-example-angular-rxjs
- @tanstack/query-example-angular-simple
- @tanstack/query-example-lit-algolia
- @tanstack/query-example-lit-auto-refetching
- @tanstack/query-example-lit-basic
- @tanstack/query-example-lit-basic-graphql-request
- @tanstack/query-example-lit-batching
- @tanstack/query-example-lit-chat
- @tanstack/query-example-lit-default-query-function
- @tanstack/query-example-lit-infinite-query-with-max-pages
- @tanstack/query-example-lit-load-more-infinite-scroll-lit-labs-router
- @tanstack/query-example-lit-offline-lit-labs-router
- @tanstack/query-example-lit-optimistic-updates
- @tanstack/query-example-lit-pagination
- @tanstack/query-example-lit-playground
- @tanstack/query-example-lit-prefetching-lit-labs-router
- @tanstack/query-example-lit-rick-morty-lit-labs-router
- @tanstack/query-example-lit-simple
- @tanstack/query-example-lit-ssr
- @tanstack/query-example-lit-star-wars-lit-labs-router
- @tanstack/query-example-preact-algolia
- @tanstack/query-example-preact-auto-refetching
- @tanstack/query-example-preact-basic
- @tanstack/query-example-preact-basic-graphql-request
- @tanstack/query-example-preact-batching
- @tanstack/query-example-preact-chat
- @tanstack/query-example-preact-default-query-function
- @tanstack/query-example-preact-devtools-panel
- @tanstack/query-example-preact-infinite-query-with-max-pages
- @tanstack/query-example-preact-load-more-infinite-scroll-preact-iso
- @tanstack/query-example-preact-offline-preact-iso
- @tanstack/query-example-preact-optimistic-updates
- @tanstack/query-example-preact-pagination
- @tanstack/query-example-preact-playground
- @tanstack/query-example-preact-prefetching-preact-iso
- @tanstack/query-example-preact-rick-morty-preact-iso
- @tanstack/query-example-preact-shadow-dom
- @tanstack/query-example-preact-simple
- @tanstack/query-example-preact-ssr
- @tanstack/query-example-preact-ssr-streaming
- @tanstack/query-example-preact-star-wars-preact-iso
- @tanstack/query-example-preact-suspense
- @tanstack/query-example-react-algolia
- @tanstack/query-example-react-auto-refetching-nextjs-pages-router
- @tanstack/query-example-react-basic
- @tanstack/query-example-react-basic-graphql-request
- @tanstack/query-example-react-batching
- @tanstack/query-example-react-chat
- @tanstack/query-example-react-contacts-react-router
- @tanstack/query-example-react-contacts-tanstack-router
- @tanstack/query-example-react-default-query-function
- @tanstack/query-example-react-devtools-panel
- @tanstack/query-example-react-eslint-legacy
- @tanstack/query-example-react-eslint-plugin-demo
- @tanstack/query-example-react-infinite-query-with-max-pages-nextjs-pages-router
- @tanstack/query-example-react-load-more-infinite-scroll-nextjs-pages-router
- @tanstack/query-example-react-nextjs
- @tanstack/query-example-react-nextjs-app-optimistic-updates
- @tanstack/query-example-react-nextjs-app-prefetching
- @tanstack/query-example-react-nextjs-suspense-streaming
- @tanstack/query-example-react-offline-react-router
- @tanstack/query-example-react-offline-tanstack-router
- @tanstack/query-example-react-pagination-nextjs-pages-router
- @tanstack/query-example-react-playground
- @tanstack/query-example-react-prefetching-nextjs-pages-router
- @tanstack/query-example-react-react-native
- @tanstack/query-example-react-rick-morty-react-router
- @tanstack/query-example-react-shadow-dom
- @tanstack/query-example-react-simple
- @tanstack/query-example-react-star-wars-react-router
- @tanstack/query-example-react-suspense
- @tanstack/query-example-solid-algolia
- @tanstack/query-example-solid-astro
- @tanstack/query-example-solid-auto-refetching-solid-start2
- @tanstack/query-example-solid-basic
- @tanstack/query-example-solid-basic-graphql-request
- @tanstack/query-example-solid-batching
- @tanstack/query-example-solid-chat
- @tanstack/query-example-solid-contacts-solid-router
- @tanstack/query-example-solid-contacts-tanstack-router
- @tanstack/query-example-solid-default-query-function
- @tanstack/query-example-solid-devtools-panel
- @tanstack/query-example-solid-offline-solid-router
- @tanstack/query-example-solid-offline-tanstack-router
- @tanstack/query-example-solid-optimistic-updates-solid-start2
- @tanstack/query-example-solid-pagination-solid-start2
- @tanstack/query-example-solid-playground
- @tanstack/query-example-solid-prefetching-solid-start2
- @tanstack/query-example-solid-rick-morty-solid-router
- @tanstack/query-example-solid-shadow-dom
- @tanstack/query-example-solid-simple
- @tanstack/query-example-solid-solid-start-streaming
- @tanstack/query-example-solid-star-wars-solid-router
- @tanstack/query-example-solid-suspense
- @tanstack/query-example-svelte-algolia
- @tanstack/query-example-svelte-auto-refetching-sveltekit
- @tanstack/query-example-svelte-basic-graphql-request
- @tanstack/query-example-svelte-basic-sveltekit
- @tanstack/query-example-svelte-batching
- @tanstack/query-example-svelte-chat
- @tanstack/query-example-svelte-default-query-function
- @tanstack/query-example-svelte-infinite-query-with-max-pages-sveltekit
- @tanstack/query-example-svelte-load-more-infinite-scroll-sveltekit
- @tanstack/query-example-svelte-offline-sveltekit
- @tanstack/query-example-svelte-optimistic-updates-sveltekit
- @tanstack/query-example-svelte-pagination-sveltekit
- @tanstack/query-example-svelte-playground-sveltekit
- @tanstack/query-example-svelte-prefetching-sveltekit
- @tanstack/query-example-svelte-rick-morty-sveltekit
- @tanstack/query-example-svelte-shadow-dom
- @tanstack/query-example-svelte-simple
- @tanstack/query-example-svelte-ssr-sveltekit
- @tanstack/query-example-svelte-star-wars-sveltekit
- @tanstack/query-example-svelte-sveltekit
- @tanstack/query-example-vue-2.6-basic
- @tanstack/query-example-vue-2.7-basic
- @tanstack/query-example-vue-algolia
- @tanstack/query-example-vue-auto-refetching-nuxt4
- @tanstack/query-example-vue-basic
- @tanstack/query-example-vue-basic-graphql-request
- @tanstack/query-example-vue-batching
- @tanstack/query-example-vue-chat
- @tanstack/query-example-vue-contacts-tanstack-router
- @tanstack/query-example-vue-contacts-vue-router
- @tanstack/query-example-vue-default-query-function
- @tanstack/query-example-vue-dependent-queries
- @tanstack/query-example-vue-devtools-panel
- @tanstack/query-example-vue-infinite-query-with-max-pages-nuxt4
- @tanstack/query-example-vue-load-more-infinite-scroll-nuxt4
- @tanstack/query-example-vue-offline-tanstack-router
- @tanstack/query-example-vue-offline-vue-router
- @tanstack/query-example-vue-optimistic-updates-nuxt4
- @tanstack/query-example-vue-pagination-nuxt4
- @tanstack/query-example-vue-persister
- @tanstack/query-example-vue-playground
- @tanstack/query-example-vue-prefetching-nuxt4
- @tanstack/query-example-vue-rick-morty-vue-router
- @tanstack/query-example-vue-shadow-dom
- @tanstack/query-example-vue-simple
- @tanstack/query-example-vue-simple-nuxt3
- @tanstack/query-example-vue-simple-nuxt4
- @tanstack/query-example-vue-star-wars-vue-router
- @tanstack/query-example-vue-suspense
@tanstack/angular-query-experimental
npm i https://pkg.pr.new/@tanstack/angular-query-experimental@12519@tanstack/eslint-plugin-query
npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@12519@tanstack/lit-query
npm i https://pkg.pr.new/@tanstack/lit-query@12519@tanstack/preact-query
npm i https://pkg.pr.new/@tanstack/preact-query@12519@tanstack/preact-query-devtools
npm i https://pkg.pr.new/@tanstack/preact-query-devtools@12519@tanstack/preact-query-persist-client
npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@12519@tanstack/query-async-storage-persister
npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@12519@tanstack/query-broadcast-client-experimental
npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@12519@tanstack/query-core
npm i https://pkg.pr.new/@tanstack/query-core@12519@tanstack/query-devtools
npm i https://pkg.pr.new/@tanstack/query-devtools@12519@tanstack/query-persist-client-core
npm i https://pkg.pr.new/@tanstack/query-persist-client-core@12519@tanstack/query-sync-storage-persister
npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@12519@tanstack/react-query
npm i https://pkg.pr.new/@tanstack/react-query@12519@tanstack/react-query-devtools
npm i https://pkg.pr.new/@tanstack/react-query-devtools@12519@tanstack/react-query-next-experimental
npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@12519@tanstack/react-query-persist-client
npm i https://pkg.pr.new/@tanstack/react-query-persist-client@12519@tanstack/solid-query
npm i https://pkg.pr.new/@tanstack/solid-query@12519@tanstack/solid-query-devtools
npm i https://pkg.pr.new/@tanstack/solid-query-devtools@12519@tanstack/solid-query-persist-client
npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@12519@tanstack/svelte-query
npm i https://pkg.pr.new/@tanstack/svelte-query@12519@tanstack/svelte-query-devtools
npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@12519@tanstack/svelte-query-persist-client
npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@12519@tanstack/vue-query
npm i https://pkg.pr.new/@tanstack/vue-query@12519@tanstack/vue-query-devtools
npm i https://pkg.pr.new/@tanstack/vue-query-devtools@12519commit:
f1028b4size-limit report 📦#
Path Size react full 11.84 KB (0%) react minimal 8.66 KB (0%) sukvvon(GitHub profile, opens in a new tab) changed the title
sukvvon(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
⚠️ No Changeset found#
Latest commit: f1028b400acb4541cf0acc233c52ea022aa414e2
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