pst 4 days ago

Everything under internal did discourage me from trying templUI too. What's the reason for it?

1
axadrn 2 days ago

Yeah, totally fair question.

Originally, I had templUI components available via Go module imports, but there were a few real issues:

- Tailwind v4+ with CSS-only config needs hardcoded paths to `.templ` files. That clashed in teams where Go paths differed (e.g. `~/dev`, `~/code`, etc.).

- It made Git diffs messy – you had `.templ` and `.go` files being imported per component.

- Updating components via module versions often led to unwanted breaking changes – not easy to "just use one component" from a newer version.

- Workarounds like Makefile tricks for Tailwind `src` path felt too hacky.

The CLI avoids all that. It copies clean files into your codebase, so it's portable, version-safe, and no import path magic needed.

That said – I’m open to feedback. If there's a solid reason to bring back module imports (optionally), I’m listening!