As this commit makes it possible to use hbs style code as a widget template, and that being a simpler and better way of doing things than generating HTML using the hyper script object.
I was thinking if it is possible(or would it be cool as a proposal) to be able to pass a .hbs file as a parameter to createWidget function’s template field instead of writing the template code there itself?
In diesem Fall können wir hbs nicht verwenden, da der hbs-Compiler in Widgets zu Virtual DOM kompiliert wird, während der Compiler für .hbs das Zwischenformat von Glimmer nutzt.
Wir könnten eine weitere Erweiterung wie .widget.hbs oder ähnlich erstellen, um dies zu ermöglichen.
Ich denke jedoch, dass es in den meisten Fällen sinnvoll ist, den Widget-Code direkt im Widget selbst zu halten. Ich müsste ein überzeugendes Beispiel sehen.