unstale

npm / @sveltejs/vite-plugin-svelte

@sveltejs/vite-plugin-svelte

What changed in @sveltejs/vite-plugin-svelte 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-22.

7 breaking1 new APIs and options2 behavior and defaults1 tooling6 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.3 on npm

@sveltejs/vite-plugin-svelte 717 changes

Breaking changes 7

  • The deprecated vite-plugin-svelte:api property is removed; use api.filter instead.

    7.0.0release notes

  • The property used by other Vite plugins is removed; update affected plugins to a newer version or remove them.

    7.0.0release notes

  • Svelte 5.46.4 or later is now required.

    7.0.0release notes

  • Vite 8 is now required.

    7.0.0release notes

  • The inspector is integrated into vite-plugin-svelte to avoid a circular dependency.

    7.0.0release notes

  • The deprecated option in svelte.config.js is removed; use compilerOptions.hmr instead.

    7.0.0release notes

  • The deprecated option in svelte.config.js is removed because it is no longer needed.

    7.0.0release notes

New APIs and options 1

  • dynamicCompileOptions now receives the environment, allowing its compile options to depend on it.

    7.3.0release notes

Behavior and default changes 2

  • The optimizer is enabled for server environments during development.

    7.1.0release notes

  • The plugin no longer overrides compilerOptions.cssHash because Svelte now produces a stable CSS hash by itself.

    7.0.0release notes

Tooling 1

  • The inspector adds a context menu showing the current component stack.

    7.2.0release notes

Fixes and other changes 6

  • Fixes inspector injection into the client under Vite+ on pnpm, where the realpathed client module has no vite/ segment before dist/.

    7.3.1release notes

  • Inline config is no longer logged when unexpected options are encountered.

    7.3.0release notes

  • Enforces left-to-right styles for the inspector.

    7.1.4release notes

  • Ensures the inspector is injected into the client correctly for Vite+ projects.

    7.1.3release notes

  • Correctly resolves compiled CSS on the server for dependencies with Svelte files.

    7.1.1release notesrelease notes

  • vitePreprocess now passes this TypeScript option to transformWithOxc, preventing value imports from being dropped when referenced only in Svelte template markup.

    7.1.1release notes