From 35be997a5b6c51b6f7e4fa248bbd031351b01e0d Mon Sep 17 00:00:00 2001 From: xusd320 Date: Fri, 23 Aug 2024 15:42:37 +0800 Subject: [PATCH] fix: html plugin for mako (#12655) --- packages/preset-umi/src/features/mako/mako.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/preset-umi/src/features/mako/mako.ts b/packages/preset-umi/src/features/mako/mako.ts index 66e48700d716..f4c59ac9a17d 100644 --- a/packages/preset-umi/src/features/mako/mako.ts +++ b/packages/preset-umi/src/features/mako/mako.ts @@ -70,7 +70,7 @@ export default (api: IApi) => { generateEnd: ({ stats }: any) => { const entryPointFiles = new Set(); - for (const chunk of stats.entrypoints['umi'].chunks) { + for (const chunk of stats.entrypoints['umi']?.chunks || []) { const files = stats.chunks.find((c: any) => c.id === chunk).files; for (const file of files) { entryPointFiles.add(file);