mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-07-07 18:07:32 +08:00
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:
@@ -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: {}
|
||||
|
||||
Reference in New Issue
Block a user