# @sveltejs/vite-plugin-svelte

> The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev).

Latest version **7.3.1** (published 2026-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sveltejs/vite-plugin-svelte
pnpm add @sveltejs/vite-plugin-svelte
yarn add @sveltejs/vite-plugin-svelte
bun add @sveltejs/vite-plugin-svelte
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.3.1 |
| Published | 2026-09-23 |
| First published | 2021-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^20.19 \|\| ^22.12 \|\| >=24 |
| Dependencies | 4 |
| Unpacked size | 144.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | rich_harris, svelte-admin, conduitry |
| Keywords | vite-plugin, vite plugin, vite, svelte |

## Links

- npm: https://www.npmjs.com/package/@sveltejs/vite-plugin-svelte
- Repository: https://github.com/sveltejs/vite-plugin-svelte
- Homepage: https://github.com/sveltejs/vite-plugin-svelte#readme
- Issues: https://github.com/sveltejs/vite-plugin-svelte/issues
- npm.io page: https://npm.io/package/@sveltejs/vite-plugin-svelte

## Dependencies (4)

- [obug](https://npm.io/package/obug.md) ^2.1.0
- [vitefu](https://npm.io/package/vitefu.md) ^1.1.2
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.3.1
- [magic-string](https://npm.io/package/magic-string.md) ^1.0.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 7.3.1 (latest) — 2026-09-23
- 7.0.0-next.1 (next) — 2026-02-23
- 5.1.1 (version-5) — 2025-07-11
- 4.0.4 (version-4) — 2024-12-18
- 2.5.3 (version-2) — 2023-11-22
- 2.0.0-beta.3 (beta) — 2022-12-09
- 7.3.0 — 2026-08-08
- 7.2.0 — 2026-07-07
- 7.1.4 — 2026-07-06
- 7.1.3 — 2026-07-06
- 7.1.2 — 2026-05-07
- 7.1.1 — 2026-05-06
- 7.1.0 — 2026-05-05
- 7.0.0 — 2026-02-23
- 7.0.0-next.0 — 2026-01-16
- … 131 more at https://npm.io/package/@sveltejs/vite-plugin-svelte/versions

## README

# @sveltejs/vite-plugin-svelte

The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev).

## Usage

```js
// vite.config.js
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';

export default defineConfig({
  plugins: [
    svelte({
      // plugin options
    })
  ]
});
```

## Documentation

- [Plugin options](../../docs/config.md)
- [FAQ](../../docs/faq.md)

## License

[MIT](./LICENSE)

---
_Source: https://npm.io/package/@sveltejs/vite-plugin-svelte · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
