@astrojs/renderer-preact

Use Preact components within Astro

Usage no npm install needed!

<script type="module">
  import astrojsRendererPreact from 'https://cdn.skypack.dev/@astrojs/renderer-preact';
</script>

README

@astrojs/renderer-preact

This is a plugin for Astro apps that enables server-side rendering of Preact components.

Installation

Install @astrojs/renderer-preact and then add it to your astro.config.mjs in the renderers property:

npm install @astrojs/renderer-preact

astro.config.mjs

export default {
  // ...

  renderers: [
    // ...
    '@astrojs/renderer-preact'
  ]
}

Documentation

Astro Renderer Documentation