Proposal: Improve Watch Mode for a better development experience #340
stephenafamo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Continuation of #318
The problem
When working with Templ, the time between making a change and being able to view the change is often too slow.
This is because the Go code has to be generated from the template, and then the whole application has to be recompiled and restarted.
Having the whole thing recompiled is good for production since it would execute quickly, but during development, it is a pain to wait for restarts for every little change.
Proposed solution
I would suggest the following changes to
--watch
On startup
On change
_templ.go
file is regenerated.On end
_templ.go
file is regenerated with the static strings written directly into the file, the same way it currently works.Edit
Implemented in #366
Beta Was this translation helpful? Give feedback.
All reactions