Skip to content

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:

  1. Helper Function - Generate HTML tags to link to your Vite assets
  2. HTTP Handler - A complete http.Handler to serve your Vite application

Prerequisites

Before using this library, ensure your Vite frontend is configured correctly:

IMPORTANT

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.