diff --git a/vue/src/components/Modals/GenericModalForm.vue b/vue/src/components/Modals/GenericModalForm.vue index d6739aefa..b12f1ecf2 100644 --- a/vue/src/components/Modals/GenericModalForm.vue +++ b/vue/src/components/Modals/GenericModalForm.vue @@ -1,34 +1,43 @@ @@ -116,6 +125,15 @@ export default { return undefined } }, + form_component() { + // TODO this leads webpack to create one .js file for each component in this folder because at runtime any one of them could be requested + // TODO this is not necessarily bad but maybe there are better options to do this + if (this.form.component !== undefined){ + return () => import(/* webpackChunkName: "header-component" */ `@/components/${this.form.component}`) + }else{ + return undefined + } + }, }, watch: { show: function () {