Closed akdotio closed 1 week ago
Thanks a lot for for putting this together, but we realised that we needed to sort out the organisation of imports too, so we've implemented a fix for the imports more generally at https://github.com/a-h/templ/pull/793
It makes it so that there's only two imports - templ, and templruntime, so the generated code won't have magic imports that you can't see like io
etc. Additionally, any missing imports will be added automatically.
This PR addresses issue #775, where duplicate import statements in generated templates caused
go build
to fail.Changes Made:
With these changes, the generator will no longer produce duplicate import statements, ensuring successful builds.