coxmi / ssr-tools

A collection of tools to use in SSR rendering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note: this is a work in progress

ssr-tools

Some tools to use in SSR-rendered apps, designed primarily around preact islands, vite, and a next-style file router.

Using vite:

import preact from '@preact/preset-vite'
import { islands, fileRouter, client } from 'ssr-tools'

defineConfig({
    plugins: [
        preact(),
        islands(),
        fileRouter(),
        client(),
    ],
    build: {
        ssr: true 
    }
})

Acknowledgements

Adapted from vite-plugin-voie, and barelyhuman's preact-island-plugins.

About

A collection of tools to use in SSR rendering

License:Other


Languages

Language:TypeScript 99.0%Language:JavaScript 1.0%