diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index 96de1a57bba..eb7c388e4f2 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -89,6 +89,7 @@ import ManageObjectStoreIndex from "@/components/ObjectStore/Instances/ManageInd import UpgradeObjectStoreInstance from "@/components/ObjectStore/Instances/UpgradeInstance.vue"; import CreateUserObjectStore from "@/components/ObjectStore/Templates/CreateUserObjectStore.vue"; import Sharing from "@/components/Sharing/SharingPage.vue"; +// import CustomToolEditor from "@/components/Tool/CustomToolEditor.vue"; import HistoryStorageOverview from "@/components/User/DiskUsage/Visualizations/HistoryStorageOverview.vue"; import UserDatasetPermissions from "@/components/User/UserDatasetPermissions.vue"; import WorkflowPublished from "@/components/Workflow/Published/WorkflowPublished.vue"; @@ -98,6 +99,19 @@ import WorkflowInvocationState from "@/components/WorkflowInvocationState/Workfl Vue.use(VueRouter); +// Async component for CustomToolEditor to reduce bundle size +const CustomToolEditor = () => ({ + component: import("@/components/Tool/CustomToolEditor.vue"), + loading: { + template: '
Loading Tool Editor...
' + }, + error: { + template: '
Failed to load Tool Editor
' + }, + delay: 200, + timeout: 10000 +}); + // patches $router.push() to trigger an event and hide duplication warnings patchRouterPush(VueRouter); @@ -457,12 +471,12 @@ export function getRouter(Galaxy) { }, { path: "/tools/editor", - component: () => import("@/components/Tool/CustomToolEditor.vue"), + component: CustomToolEditor, redirect: redirectAnon(), }, { path: "/tools/editor/:toolUuid", - component: () => import("@/components/Tool/CustomToolEditor.vue"), + component: CustomToolEditor, redirect: redirectAnon(), props: true, },