proxy.golang.org : github.com/olivere/vite
Package vite implements a Vite backend integration for Go as described in https://vitejs.dev/guide/backend-integration.html. The integration is done by a HTTP handler that implements http.Handler. The handler has two modes: Development and production.The handler is configured by passing a Config struct to the NewHandler function. The Config struct has four fields: Notice that you need to run the Vite server in the background in development mode, so open up a 2nd console and run something like "npm run dev". Example: In production mode, you typically embed the whole generated dist directory generated by "vite build" into the Go binary, using go:embed. In that case, your first parameter needs to be the embedded "dist" file system. The second parameter must be false to enable production mode. The last parameter can be blank, as it is not used in production mode. Example:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/olivere/vite
License: MIT
Latest release: 3 months ago
First release: 3 months ago
Namespace: github.com/olivere
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago