From d9992a2cda777bbf504958ca2c07ed9ab7475d90 Mon Sep 17 00:00:00 2001 From: xusd320 Date: Fri, 23 Aug 2024 15:39:50 +0800 Subject: [PATCH] fix: html plugin for mako --- 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);