Scott Whittaker

Frontend Developer

Day job React | side projects Svelte

Adding the Svelte renderer to Astro

Assuming you have astro installed already and you want to use Svelte components on your site, then you need to install the Svelte renderer and add it to the config.

Astro renderers

Install the Svelte renderer

npm install @astrojs/renderer-svelte

Add the the Svelte renderer to config

Add the renderer in astro.config.mjs.

export default {
    renderers: ['@astrojs/renderer-preact', '@astrojs/renderer-svelte']
};