Skip to content

Instantly share code, notes, and snippets.

View eastgold15's full-sized avatar

PoRi eastgold15

View GitHub Profile
@hUwUtao
hUwUtao / frontend.ts
Created December 7, 2025 07:26
Bun bundler dev & single-bundle build serve
/*
This is suppose to bridge the gap between bun production bundler and elysia, while managing to make it work without building the server bundle.
Suppose to build a single executable server with SPA.
https://bun.com/reference/bun/HTMLBundle
*/
import Elysia from "elysia";
import indexHtml from "../public/index.html";
const built = !!indexHtml.files