# テーマやプラグインを\`.gjs\`に切り替えるタイミングは？

**URL:** https://meta.discourse.org/t/when-to-switch-themes-plugins-to-gjs/370063
**Category:** Development
**Created:** [2025 年 6 月 13 日午前 10:15 UTC](https://meta.discourse.org/t/when-to-switch-themes-plugins-to-gjs/370063 "2025-06-13T10:15:31Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2025 年 6 月 16 日午後 3:33 UTC](https://meta.discourse.org/t/when-to-switch-themes-plugins-to-gjs/370063/20 "2025-06-16T15:33:46Z")

</div>

right-sidebar-blocks と discourse-tc-bars はどちらも Ember リゾルバを使用して名前でコンポーネントを検索しています。現時点ではこれは機能しており、非推奨ではありません。

`.hbs` では `{{component \"some-name\"}}` のように行われ、(g)js では `resolveRegistration(\"component:some-name\")` のように行われます。

しかし、長期的なことを考えると、Ember リゾルバでコンポーネントを検索することは避けるべきです。最終的に Embroider の「静的呼び出し可能」フラグを有効にすると、リゾルバは空になります。

これが、right-sidebar-blocks およびその他の同様のテーマ/プラグイン間のコンポーネント共有で取るべき方向性だと思います。

> <https://github.com/discourse/discourse-right-sidebar-blocks/pull/84>
>
> In the near future, runtime resolution of components via the ember resolver will… no longer be possible. This commit introduces a dedicated list of Right Sidebar Blocks components, and allows other themes/plugins to register additional ones.
> 
> This also avoids the issue of normal component names clashing with rsb block names, so specific handling of cases like \`custom-html-rsb\` is no longer necessary.
> 
> Other themes/plugins can register new blocks via the new \`right-sidebar-blocks\` value transformer
> 
> \`\`\`js
> api.registerValueTransformer(
> "right-sidebar-blocks",
> ({ value: blocks }) =\> blocks.set("my-amazing-block", MyAmazingBlock)
> );
> \`\`\`
> 
> For now, resolution of components via the Ember resolver is still supported, but will print a deprecation message to the console with upgrade instructions.

---

_[View the full topic](https://meta.discourse.org/t/when-to-switch-themes-plugins-to-gjs/370063)._
