fix(web): 修复 web 端构建失败(顶层 await 超出默认 target)

f652932 起 MusicHook 使用顶层 await,vite 默认 target(es2020/chrome87)
无法转译,npx vite build 直接报错——web 版因此无法产出新构建(#641 的
'网页版还是 5.0.0'与此相关)。build.target 提升至 es2022。

Ref #641
This commit is contained in:
alger
2026-07-05 15:06:13 +08:00
parent 0f88a9dc14
commit 4554246c69
+4
View File
@@ -35,6 +35,10 @@ export default defineConfig({
})
],
publicDir: resolve('resources'),
build: {
// MusicHook 等模块使用顶层 await,默认 target(es2020) 无法转译导致 web 构建失败
target: 'es2022'
},
server: {
host: '0.0.0.0',
proxy: {}