What's the point of literalWriter
?
#942
Closed
MilkeeyCat
started this conversation in
General
Replies: 2 comments
-
In watch mode, the code reads the file from disk, so you don't need to recompile and restart your Go program if you only make changes to text or HTML, see https://templ.guide/commands-and-tools/live-reload/ for more information - the sequence diagram should make it clearer how that works. There is a plan to make it so that the code that's generated in prod mode is identical in dev mode, and to use an environment variable to switch to dev mode. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah, I see, I didn't try to think about it like that, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was checking code generation for dev mode and I don't really understand what's the point of using literalWriter and
_templ.txt
files. How is it faster than just putting string literals in right in generated go files, as in production mode?Beta Was this translation helpful? Give feedback.
All reactions