olovastart
v0.0.11
Published
Vite plugin for Olova SSR/SSG framework with React
Maintainers
Readme
vite-plugin-olova
A Vite plugin for building SSR/SSG applications with React and the Olova framework.
Installation
npm install vite-plugin-olovaUsage
Add the plugin to your vite.config.ts:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { olova } from "vite-plugin-olova";
export default defineConfig({
plugins: [
react(),
olova({
staticPaths: ["/about", "/contact"], // Optional: additional paths to pre-render
}),
],
});How It Works
The plugin provides:
vite-plugin-olova- The main Vite pluginvite-plugin-olova/entry-client- Client-side hydration entryvite-plugin-olova/entry-server- Server-side rendering entry
The entry files use virtual:olova-app which resolves to your app's route configuration from @/route.tree.
Features
- SSR (Server-Side Rendering): Full server-side rendering support during development
- SSG (Static Site Generation): Automatically generates static HTML files at build time
- Route-based code splitting: Lazy loading for optimal performance
- Hydration: Seamless client-side hydration
Options
| Option | Type | Description |
| ------------- | ---------- | ----------------------------------------------- |
| staticPaths | string[] | Additional paths to pre-render during SSG build |
Peer Dependencies
react>= 18.0.0react-dom>= 18.0.0vite>= 5.0.0
License
MIT
