import { precompile } from '@glimmer/compiler' ; import type { TemplateFactory } from 'htmlbars-inline-precompile' ; import { createTemplateFactory } from '@ember/template-factory' ; export function compileTemplate ( source ) { return createTemplateFactory ( JSON . parse ( precompile ( source ) ) ) ; }