Merge branch 'base' into i18n

This commit is contained in:
菲鸽 2024-06-19 14:09:46 +08:00
commit fb9294a227
2 changed files with 2 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html build-time="%BUILD_TIME%" build-branch="%BUILD_BRANCH%"> <html build-time="%BUILD_TIME%">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

View File

@ -92,11 +92,7 @@ export default ({ command, mode }) => {
UNI_PLATFORM === 'h5' && { UNI_PLATFORM === 'h5' && {
name: 'html-transform', name: 'html-transform',
transformIndexHtml(html) { transformIndexHtml(html) {
const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim() return html.replace('%BUILD_TIME%', dayjs().format('YYYY-MM-DD HH:mm:ss'))
console.log('branch -> ', branch)
return html
.replace('%BUILD_TIME%', dayjs().format('YYYY-MM-DD HH:mm:ss'))
.replace('%BUILD_BRANCH%', branch)
}, },
}, },
// 打包分析插件h5 + 生产环境才弹出 // 打包分析插件h5 + 生产环境才弹出