@collie-lang/vite
v1.6.0
Published
Vite plugin for Collie (.collie -> React component).
Downloads
1,612
Readme
@collie-lang/vite
Vite plugin that builds the Collie template registry and virtual template modules.
Install
pnpm add -D @collie-lang/vite
pnpm add @collie-lang/reactUsage
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import collie from "@collie-lang/vite";
export default defineConfig({
plugins: [collie(), react()]
});Create templates with #id blocks:
#id app.hero
div.hero
h1 {{ title }}
#id app.cta
button.primary {{ label }}Render them via the runtime:
import { Collie } from "@collie-lang/react";
export function App() {
return <Collie id="app.hero" title="Hello" />;
}Direct .collie imports are not supported; templates are discovered automatically by the plugin.
