增强兼容性

main
mula.liu 2026-01-21 12:54:07 +08:00
parent e9c4cfa33e
commit 45242a1fa1
1 changed files with 1 additions and 3 deletions

View File

@ -12,9 +12,7 @@ export default defineConfig(({ mode }) => {
},
plugins: [react()],
build: {
// 设置为 es2015Vite (esbuild) 会自动把 ?. 和 ?? 转译成常规的 if/else
target: 'es2015',
cssTarget: 'chrome61', // 防止 CSS 中的新特性在旧浏览器报错
target: 'es2015',
},
define: {
'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY),