Tags: gsxhq/vite
Tags
fix(reload): close the NotifyReload connection after the POST (#1) An idle pooled keep-alive connection to the Vite (Node) dev server is torn down by Node's keepAliveTimeout, and the teardown can emit an unsolicited "HTTP/1.1 400 Bad Request" that Go's transport logs as Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 400 Bad Request\r\n\r\n"; err=<nil> in the app's terminal output — alarming noise, nothing actually wrong. NotifyReload makes exactly one POST per server start, so close the connection instead of pooling it. Claude-Session: https://claude.ai/code/session_01QA44dyPcgxnjeJJDhcEKak
fix(manifest): resolve a CSS-only entry to CSS, not JS
A standalone CSS entry (e.g. a Tailwind stylesheet built as its own Vite entry,
manifest file ending in .css) was placed in Bundle.JS, so callers rendered it as
a <script type="module">. In prod the browser rejects a .css module script on
MIME type ("Expected a JavaScript module but got text/css"); in dev the Vite
server serves it as JS so it slipped through. Route a .css entry file to
Bundle.CSS so it renders as <link rel="stylesheet">.
feat: context helpers — NewContext/FromContext/Middleware (v0.2.0) Stash/retrieve *Vite via context.Context so handlers and templates read the asset bundle from ctx instead of threading it as a parameter. Unexported context key (no collision), nil-safe FromContext, request-scoped Middleware. Claude-Session: https://claude.ai/code/session_01WYfSGNoFisL8JdENKfL5CA