TypeScript 6/7 stopped auto-discovering @types
Per Bun’s docs, TypeScript 6 and 7 no longer auto-discover @types packages. Without "types": ["bun"] in tsconfig.json, the Bun globals don’t resolve at all.
Notes
Most of what this project taught came from things that broke. These notes are the parts worth keeping.
Per Bun’s docs, TypeScript 6 and 7 no longer auto-discover @types packages. Without "types": ["bun"] in tsconfig.json, the Bun globals don’t resolve at all.
The CSS file comes in with with { type: “text” }, backed by a declaration shim so TypeScript understands it. Vite’s ?raw trick has no direct equivalent.
bun --bun run build used to never exit: @hono/vite-ssg starts an internal server whose WebSocket never closes under Bun. A build that prints nothing and doesn’t finish is a hang, not a success.
A noindex rule can never hit real unmatched paths, because the rule sees the requested URL, not the 404.html file that gets served. The meta tag has to carry that job.
hono/css dedupes by class name at render time. A page only ships the styles of the components it actually rendered, which is why the 404 page has none of the home page’s styles.
None of this is groundbreaking. All of it was new to the person who built it.
For context: this project was built with an AI assistant doing most of the research, fetching docs and how-tos. These notes are what survived the build.