Skip to content
Source
Sign inSign up
TanStack/query

chore(*): move Svelte config from 'svelte.config.js' into 'vite.config.ts' #12519

Mergedsukvvon(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/12519/headmerged 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: remove svelte.config.js and pass preprocess, adapter, typescript and compilerOptions to sveltekit() in vite.config.ts.
  • 7 Vite-based Svelte examples and integrations/svelte/vite: remove svelte.config.js and pass preprocess and compilerOptions to svelte() in vite.config.ts.
  • svelte-query, svelte-query-devtools and svelte-query-persist-client: remove svelte.config.js and pass preprocess and compilerOptions to svelte() in vite.config.ts. svelte-package output is byte-identical without the config file, since vitePreprocess() leaves <script lang="ts"> untouched.
  • eslint.config.js in 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. ⚠️ 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

    2. View your CI Pipeline Execution ↗ for commit f1028b400acb4541cf0acc233c52ea022aa414e2

      CommandStatusDurationResult
      nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded3m 31sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded<1sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-11-04 06:31:37 UTC

    3. 🚀 Changeset Version Preview

      5 package(s) bumped directly, 19 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/preact-query-devtools5.105.3 → 5.105.4Changeset
      @tanstack/query-devtools5.105.3 → 5.105.4Changeset
      @tanstack/react-query-devtools5.105.3 → 5.105.4Changeset
      @tanstack/solid-query-devtools5.105.3 → 5.105.4Changeset
      @tanstack/vue-query-devtools6.3.9 → 6.3.10Changeset
      @tanstack/angular-query-experimental5.105.3 → 5.105.4Dependent
      @tanstack/eslint-plugin-query5.105.3 → 5.105.4Dependent
      @tanstack/lit-query0.2.34 → 0.2.35Dependent
      @tanstack/preact-query5.105.3 → 5.105.4Dependent
      @tanstack/preact-query-persist-client5.105.3 → 5.105.4Dependent
      @tanstack/query-async-storage-persister5.105.3 → 5.105.4Dependent
      @tanstack/query-broadcast-client-experimental5.105.3 → 5.105.4Dependent
      @tanstack/query-core5.105.3 → 5.105.4Dependent
      @tanstack/query-persist-client-core5.105.3 → 5.105.4Dependent
      @tanstack/query-sync-storage-persister5.105.3 → 5.105.4Dependent
      @tanstack/react-query5.105.3 → 5.105.4Dependent
      @tanstack/react-query-next-experimental5.105.3 → 5.105.4Dependent
      @tanstack/react-query-persist-client5.105.3 → 5.105.4Dependent
      @tanstack/solid-query5.105.3 → 5.105.4Dependent
      @tanstack/solid-query-persist-client5.105.3 → 5.105.4Dependent
      @tanstack/svelte-query6.3.9 → 6.3.10Dependent
      @tanstack/svelte-query-devtools6.3.9 → 6.3.10Dependent
      @tanstack/svelte-query-persist-client6.3.9 → 6.3.10Dependent
      @tanstack/vue-query5.105.3 → 5.105.4Dependent
    4. Explain Change →

      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.js into Vite configuration. SvelteKit configurations also move adapter and TypeScript include settings. ESLint configurations no longer import or pass svelte.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.js and 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 delete svelte.config.js and 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 to svelte(). Both delete svelte.config.js.

      Estimated code review effort: 2 (Simple) | ~12 minutes

      Possibly related PRs

      Suggested reviewers: lachlancollins

      Merge Risk: Minimal · up to f1028

      The configuration migration has no established blocking regression and is mergeable subject to normal checks.

      Pre-merge checks: Passed 5
      Check nameStatusExplanation
      Title checkPassedThe title clearly and concisely describes the main change: moving Svelte configuration from svelte.config.js into vite.config.ts.
      Description checkPassedThe 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 CoveragePassedNo 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 checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck 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.

      Share
      Recent review info
      Run configuration
      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.js
      • packages/svelte-query-devtools/svelte.config.js
      • packages/svelte-query-devtools/vite.config.ts
      • packages/svelte-query-persist-client/eslint.config.js
      • packages/svelte-query-persist-client/svelte.config.js
      • packages/svelte-query-persist-client/vite.config.ts
      • packages/svelte-query/eslint.config.js
      • packages/svelte-query/svelte.config.js
      • packages/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.

    5. More templates

      @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@12519

      commit: f1028b4

    6. size-limit report 📦

      PathSize
      react full11.84 KB (0%)
      react minimal8.66 KB (0%)
    7. sukvvon(GitHub profile, opens in a new tab) changed the title

Sign in to join this conversation.