Hello, I’m building a new hbs strategy for ember-svg-jar and wonder if it would be possible to dynamic import template only components?
The idea is to create a component which dynamic import template only components created at build time
export default class SvgComponent extends GlimmerComponent {
constructor() {
super(...arguments);
this.loadSvg(this.args.name);
}
loadSvg(name){
if(!CACHE.has(name)) {
return import(name).then(comp => CACHE.set(name))
}
}
}
{{#unless this.isLoading}}
{{component this.args.name}}
{{/unless}}
Would something like is viable with ember-auto-import?
1 post - 1 participant