From 29bd63d751189859e60f47622994251a7a445fc8 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 23 Feb 2026 06:31:14 +0000 Subject: [PATCH] fix: add stub main() for non-WASM builds in cmd/wasm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WASM main.go is gated behind //go:build js && wasm, leaving register.go (//go:build !js) as the only file on native builds — but it had no main(). Adds a stub that prints a usage hint. Co-Authored-By: Virgil --- cmd/wasm/register.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/wasm/register.go b/cmd/wasm/register.go index 008b936..d003e32 100644 --- a/cmd/wasm/register.go +++ b/cmd/wasm/register.go @@ -20,3 +20,7 @@ func buildComponentJS(slotsJSON string) (string, error) { } return codegen.GenerateBundle(slots) } + +func main() { + fmt.Println("go-html WASM module — build with GOOS=js GOARCH=wasm") +}