diff --git a/index.html b/index.html index 2e368d0..b943058 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ '" />', ) - unibest + %VITE_APP_TITLE% diff --git a/vite.config.ts b/vite.config.ts index d891a2a..c1a6da9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -111,7 +111,7 @@ export default ({ command, mode }) => { UNI_PLATFORM === 'h5' && { name: 'html-transform', transformIndexHtml(html) { - return html.replace('%BUILD_TIME%', dayjs().format('YYYY-MM-DD HH:mm:ss')) + return html.replace('%BUILD_TIME%', dayjs().format('YYYY-MM-DD HH:mm:ss')).replace('%VITE_APP_TITLE%', env.VITE_APP_TITLE) }, }, // 打包分析插件,h5 + 生产环境才弹出