@astrojs/svelte-renderer
v0.1.2
Published
The Svelte renderer of Astro components, for `astro()` from `@astrojs/vite-plugin-astro`
Readme
@astrojs/svelte-renderer
The Svelte renderer of Astro components. Use it with @astrojs/vite-plugin-astro to server-render Svelte components used in .astro files and hydrate them as islands.
You don't need this package when using Astro without the Vite plugin. Astro projects use @astrojs/svelte, which registers this renderer itself.
// vite.config.js
import astro from '@astrojs/vite-plugin-astro';
import svelte from '@astrojs/svelte-renderer';
import { svelte as viteSvelte } from '@sveltejs/vite-plugin-svelte';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [astro({ renderers: [svelte()] }), viteSvelte()],
});Compiling Svelte components is the job of @sveltejs/vite-plugin-svelte, added to the Vite plugins next to astro().
Documentation
Read how to use @astrojs/svelte-renderer in the Astro Vite plugin docs
Support
- Get help in the Astro Discord. Post questions in our
#supportforum, or visit our dedicated#devchannel to discuss current development and more! - Check our [Astro Integration Documentation][astro-integration] for more on integrations.
- Submit bug reports and feature requests as GitHub issues.
Contributing
This package is maintained by Astro's Core team. You're welcome to submit an issue or PR! These links will help you get started:
License
MIT
Copyright (c) 2023–present Astro
