Commit 8ae3e3bb by weiw

fix:处理浏览器的title以及图标

parent cb8cbb71
...@@ -17,6 +17,19 @@ Object.keys(process.env).forEach((key) => { ...@@ -17,6 +17,19 @@ Object.keys(process.env).forEach((key) => {
} }
}) })
// 根据 VITE_OUTPUT_OBJ 设置不同的 title 和 favicon
let htmlConfig = {
title: '晓得. - 晓得解惑,让沟通更智能。',
favicon: './src/assets/logo.png',
}
if (process.env.VITE_OUTPUT_OBJ === 'inner') {
htmlConfig = {
title: '建信消金AI智能问答',
favicon: '',
}
}
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
pluginReact(), pluginReact(),
...@@ -26,10 +39,7 @@ export default defineConfig({ ...@@ -26,10 +39,7 @@ export default defineConfig({
dev: { dev: {
assetPrefix: '/sdream-ai', assetPrefix: '/sdream-ai',
}, },
html: { html: htmlConfig,
title: '晓得. - 晓得解惑,让沟通更智能。',
favicon: './src/assets/logo.png',
},
output: { output: {
target: 'web', target: 'web',
assetPrefix: '/sdream-ai', assetPrefix: '/sdream-ai',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment