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?
We can’t use hbs in this case because the hbs compiler inside widgets compiles down to virtual dom and the compiler for .hbs uses glimmer’s intermediate format.
We could create another extension .widget.hbs or similar and that could do it.
I think most of the time though it makes sense to keep the widget code in the widget itself. I’d have to see a convincing example.