From 91d8a3fffda507e128bc623945dbc30f0de3a113 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 23 Jan 2025 16:51:14 -0500 Subject: [PATCH] Revert importRoute simplification This caused tests to be included in the built files --- src/components/router/AsyncRoute.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/router/AsyncRoute.tsx b/src/components/router/AsyncRoute.tsx index cab2144a1b..ac878e01c8 100644 --- a/src/components/router/AsyncRoute.tsx +++ b/src/components/router/AsyncRoute.tsx @@ -15,7 +15,14 @@ export interface AsyncRoute { } const importRoute = (page: string, type: AppType) => { - return import(/* webpackChunkName: "[request]" */ `../../apps/${type}/routes/${page}`); + switch (type) { + case AppType.Dashboard: + return import(/* webpackChunkName: "[request]" */ `../../apps/dashboard/routes/${page}`); + case AppType.Experimental: + return import(/* webpackChunkName: "[request]" */ `../../apps/experimental/routes/${page}`); + case AppType.Stable: + return import(/* webpackChunkName: "[request]" */ `../../apps/stable/routes/${page}`); + } }; export const toAsyncPageRoute = ({