Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sveltejs/vite-plugin-svelte
Svelte plugin for http://vitejs.dev/
https://github.com/sveltejs/vite-plugin-svelte
svelte vite vite-plugin
Last synced: 7 days ago
JSON representation
Svelte plugin for http://vitejs.dev/
- Host: GitHub
- URL: https://github.com/sveltejs/vite-plugin-svelte
- Owner: sveltejs
- License: mit
- Created: 2021-03-16T20:54:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:46:29.000Z (3 months ago)
- Last Synced: 2024-10-29T11:45:10.028Z (3 months ago)
- Topics: svelte, vite, vite-plugin
- Language: JavaScript
- Homepage:
- Size: 5.55 MB
- Stars: 857
- Watchers: 16
- Forks: 104
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-vite - vite-plugin-svelte - Adds Svelte support. Official plugin of Svelte team. (Plugins / Svelte)
- awesome-vite - vite-plugin-svelte - Adds Svelte support. Official plugin of Svelte team. (Plugins / Svelte)
README
# @sveltejs/vite-plugin-svelte
[![npm version](https://img.shields.io/npm/v/@sveltejs/vite-plugin-svelte)](https://www.npmjs.com/package/@sveltejs/vite-plugin-svelte)
[![CI](https://github.com/sveltejs/vite-plugin-svelte/actions/workflows/ci.yml/badge.svg)](https://github.com/sveltejs/vite-plugin-svelte/actions/workflows/ci.yml)
[![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev).
## Installation
```bash
npm install --save-dev @sveltejs/vite-plugin-svelte
```## 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)
- [Svelte Inspector](./docs/inspector.md)
- [FAQ](./docs/faq.md)## Packages
| Package | Changelog |
| ------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [@sveltejs/vite-plugin-svelte](packages/vite-plugin-svelte) | [Changelog](packages/vite-plugin-svelte/CHANGELOG.md) |
| [@sveltejs/vite-plugin-svelte-inspector](packages/vite-plugin-svelte-inspector) | [Changelog](packages/vite-plugin-svelte-inspector/CHANGELOG.md) |## Got a question? / Need help?
Join the [Svelte Discord server](https://svelte.dev/chat)!
## Development
- Run `pnpm i` to install dependencies
- Run `pnpm dev` in `packages/vite-plugin-svelte` to autobuild plugin
- Run `pnpm dev` in `packages/playground/xxx` to start a Vite appNote that changes in the plugin needs restart of the Vite dev server.
## Credits
- [Svelte](https://svelte.dev) and [Vite](https://github.com/vitejs/vite#readme) creators, maintainers and contributors
- [rixo](https://github.com/rixo) - without svelte-hmr and your support this would not have been possible
- [intrnl](https://github.com/intrnl) - initial inspiration from https://github.com/intrnl/vite-plugin-svelte## License
[MIT](./LICENSE)