I know that to dynamically determine the existence of a component on Ember we can use the solutions explained here or here.
We have a helper that uses .hasRegistration('component:${component}')
This also works for Glimmer components as long as there is a .js file defined, but it doesn't work for template-only Glimmer components. The component doesn't seem to be registered in that case.
Does anyone know a solution that would work for template-only glimmer components too?
I made a demo for you over on stackblitz:
https://stackblitz.com/edit/github-k7htnb?file=app%2Fcomponents%2Fdemo.hbs
here is the code showing that what you're doing works in Ember 3.28:
Now, if I change the ember-source to 3.26.1, it's the same.
Maybe there is a slight code mismatch between what you're doing and what this demo is doing?