From 501e841f24f185c93fd40d83706b33865fa6b3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=92=B2=E5=A5=88Sakina?= <59400654+fz6m@users.noreply.github.com> Date: Mon, 5 Feb 2024 22:37:57 +0800 Subject: [PATCH] fix: `modifyHtml#path` when `exportStatic` is enabled (#12115) --- .../preset-umi/src/features/exportStatic/exportStatic.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/preset-umi/src/features/exportStatic/exportStatic.ts b/packages/preset-umi/src/features/exportStatic/exportStatic.ts index 411a2b44e35d..c08af14a71b9 100644 --- a/packages/preset-umi/src/features/exportStatic/exportStatic.ts +++ b/packages/preset-umi/src/features/exportStatic/exportStatic.ts @@ -220,7 +220,11 @@ export default (api: IApi) => { } // append html file - const htmlContent = await getMarkup(markupArgs); + const htmlContent = await getMarkup({ + ...markupArgs, + // https://github.com/umijs/umi/issues/12108 + path: route.path, + }); htmlFiles.push({ path: file,