修复在vue3+vite3 模块中使用顶层await打包的时候报错

This commit is contained in:
shizhong
2023-06-13 11:06:20 +08:00
parent b10bd23468
commit e17913d038
3 changed files with 2 additions and 13 deletions

View File

@ -97,7 +97,7 @@ export function createVitePlugins() {
deleteOriginFile: false //压缩后是否删除源文件
}),
ViteEjsPlugin(),
topLevelAwait({
topLevelAwait({ // https://juejin.cn/post/7152191742513512485
// The export name of top-level await promise for each chunk module
promiseExportName: '__tla',
// The function to generate import names of top-level await promise in each chunk module