Lite
Lite vth template
Introduction
This template is a minimal version of the full-stack vth template.
It includes Vite, React for the frontend and Hono for the backend and RPC.
Getting started
To use this template, run the CLI with --lite flag:
npm create vth --lite...or download from the repository:
npx degit mrozio13pl/vth/templates/liteProject structure
The project structure is very similar to the full-stack template:
index.tsx
client.ts
index.tsx
refresh.tsx
package.json
Hot refresh
For development, you have to include a seperate script to handle hot refresh. This is because plugins like @vitejs/plugin-react can't inject the refresh script when working with Hono.
import RefreshRuntime from '/@react-refresh';
RefreshRuntime.injectIntoGlobalHook(window);
window.$RefreshReg$ = () => {};
window.$RefreshSig$ = () => (type) => type;
window.__vite_plugin_react_preamble_installed__ = true;