Skip to content

Commit 1d0a033

Browse files
committed
fix: use dynamic import for the handlebars
1 parent f4ffb4d commit 1d0a033

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

custom/imageGenerator.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ import { callAdminForthApi } from '@/utils';
210210
import { useI18n } from 'vue-i18n';
211211
import adminforth from '@/adminforth';
212212
import { ProgressBar } from '@/afcl';
213-
import * as Handlebars from 'handlebars';
214213
import { IconCloseOutline } from '@iconify-prerendered/vue-flowbite';
215214
import { Tooltip, Skeleton } from '@/afcl'
216215
import { useRoute } from 'vue-router';
@@ -245,6 +244,7 @@ onMounted(async () => {
245244
}
246245
// iterate over all variables in template and replace them with their values from props.record[field].
247246
// if field is not present in props.record[field] then replace it with empty string and drop warning
247+
const { default: Handlebars } = await import('handlebars');
248248
const tpl = Handlebars.compile(template);
249249
const compiledTemplate = tpl(props.record);
250250
prompt.value = compiledTemplate;

0 commit comments

Comments
 (0)