From 0e4dbbef1f7d30c3e2d421a1f42a5e700276f791 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Thu, 23 Nov 2023 10:09:30 -0500 Subject: [PATCH] fix: Vite 5 manifest does not always contain imports key --- server/utils/prefetchTags.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/prefetchTags.tsx b/server/utils/prefetchTags.tsx index 4894834d3..11f8a8170 100644 --- a/server/utils/prefetchTags.tsx +++ b/server/utils/prefetchTags.tsx @@ -36,7 +36,7 @@ if (env.isProduction) { file: string ): string[] => [ manifest[file]["file"], - ...manifest[file]["imports"].map( + ...(manifest[file]["imports"] ?? []).map( (entry: string) => manifest[entry]["file"] ), ];