修复在vue3+vite3 模块中使用顶层await打包的时候报错
This commit is contained in:
parent
b10bd23468
commit
e17913d038
@ -97,7 +97,7 @@ export function createVitePlugins() {
|
|||||||
deleteOriginFile: false //压缩后是否删除源文件
|
deleteOriginFile: false //压缩后是否删除源文件
|
||||||
}),
|
}),
|
||||||
ViteEjsPlugin(),
|
ViteEjsPlugin(),
|
||||||
topLevelAwait({
|
topLevelAwait({ // https://juejin.cn/post/7152191742513512485
|
||||||
// The export name of top-level await promise for each chunk module
|
// The export name of top-level await promise for each chunk module
|
||||||
promiseExportName: '__tla',
|
promiseExportName: '__tla',
|
||||||
// The function to generate import names of top-level await promise in each chunk module
|
// The function to generate import names of top-level await promise in each chunk module
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev",
|
"build:dev": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode dev",
|
||||||
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test",
|
"build:test": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode test",
|
||||||
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static",
|
"build:static": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode static",
|
||||||
|
"build:front": "node --max_old_space_size=8000 ./node_modules/vite/bin/vite.js build --mode front",
|
||||||
"serve:pro": "vite preview --mode pro",
|
"serve:pro": "vite preview --mode pro",
|
||||||
"serve:dev": "vite preview --mode dev",
|
"serve:dev": "vite preview --mode dev",
|
||||||
"serve:test": "vite preview --mode test",
|
"serve:test": "vite preview --mode test",
|
||||||
|
@ -317,18 +317,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
|
|||||||
title: '查看 OA 请假',
|
title: '查看 OA 请假',
|
||||||
activeMenu: 'bpm/oa/leave/detail'
|
activeMenu: 'bpm/oa/leave/detail'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/bpm/task/done',
|
|
||||||
component: () => import('@/views/bpm/task/done/index.vue'),
|
|
||||||
name: 'TaskDone',
|
|
||||||
meta: {
|
|
||||||
noCache: true,
|
|
||||||
hidden: true,
|
|
||||||
canTo: true,
|
|
||||||
title: '已办任务',
|
|
||||||
activeMenu: 'bpm/task/done/index'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user