refactor(vite配置): 调整环境变量使用方式并移除未使用的配置
将VITE_APP_TITLE从env对象中解构出来直接使用 移除未使用的VITE_SHOW_SOURCEMAP配置
This commit is contained in:
@@ -48,8 +48,8 @@ export default ({ command, mode }) => {
|
||||
const {
|
||||
VITE_APP_PORT,
|
||||
VITE_SERVER_BASEURL,
|
||||
VITE_APP_TITLE,
|
||||
VITE_DELETE_CONSOLE,
|
||||
VITE_SHOW_SOURCEMAP,
|
||||
VITE_APP_PUBLIC_BASE,
|
||||
VITE_APP_PROXY_ENABLE,
|
||||
VITE_APP_PROXY_PREFIX,
|
||||
@@ -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')).replace('%VITE_APP_TITLE%', env.VITE_APP_TITLE)
|
||||
return html.replace('%BUILD_TIME%', dayjs().format('YYYY-MM-DD HH:mm:ss')).replace('%VITE_APP_TITLE%', VITE_APP_TITLE)
|
||||
},
|
||||
},
|
||||
// 打包分析插件,h5 + 生产环境才弹出
|
||||
|
||||
Reference in New Issue
Block a user