2b41db1531
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
.npmrc | ||
astro.config.mjs | ||
package.json | ||
README.md |
Using Svelte with Astro
This example showcases Astro's built-in support for Svelte.
Installation
Automatic
Bootstrap your Astro project with this template!
npm init astro -- --template framework-svelte
Manual
To use Svelte components in your Astro project:
-
Install
@astrojs/renderer-svelte
npm i @astrojs/renderer-svelte
-
Add
"@astrojs/renderer-svelte"
to yourrenderers
inastro.config.mjs
.export default { renderers: [ "@astrojs/renderer-svelte", // optionally, others... ] }
Usage
Write your Svelte components as .svelte
files in your project.