Appearance
Go-Vite Integration
This library helps you integrate a Vite frontend with a Go backend by following the official Vite backend integration guide.
Overview
This library offers two approaches:
- Helper Function - Generate HTML tags to link to your Vite assets
- HTTP Handler - A complete
http.Handler
to serve your Vite application
Prerequisites
Before using this library, ensure your Vite frontend is configured correctly:
IMPORTANT
- Follow the Vite backend integration guidelines to configure your
vite.config.(js|ts)
file to generate themanifest.json
for production.
Quick Start
bash
go get github.com/olivere/vite
Supported frameworks
This library works with all major Vite-supported frontend frameworks:
- React (with TypeScript and SWC options)
- Vue
- Vanilla JS/TS
- Preact
- Lit
- Svelte
- Solid
- Qwik
Usage
Examples
See the examples page.
License
This project is licensed under the terms specified in the LICENSE file.