# Using a hbs file as the template for widget

**URL:** <https://meta.discourse.org/t/using-a-hbs-file-as-the-template-for-widget/121420>\
**Category:** Development\
**Created:** [26 juni 2019 om 18:14 UTC](https://meta.discourse.org/t/using-a-hbs-file-as-the-template-for-widget/121420 "2019-06-26T18:14:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [1 juli 2019 om 02:07 UTC](https://meta.discourse.org/t/using-a-hbs-file-as-the-template-for-widget/121420/3 "2019-07-01T02:07:28Z")

</div>

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.

---

_[View the full topic](https://meta.discourse.org/t/using-a-hbs-file-as-the-template-for-widget/121420)._
