Skip to content

Commit e53b9ed

Browse files
committed
fix: downgrade to ES2020
1 parent a9831e6 commit e53b9ed

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const main_config = {
192192
export { main_config as CONFIG };
193193

194194
// 尝试启动主程序
195-
try{
195+
(async function (){
196196
const user_config = await (await fetch(get_file(config.config))).json()
197197
for(const key in user_config)
198198
// @ts-ignore
@@ -256,11 +256,11 @@ try{
256256
component: () => import('./admin/index.vue').then(m => m.default as Component),
257257
})
258258
__init().then(() => main(routeCfg));
259-
}catch(e){
259+
})().catch(e => {
260260
// 显示
261261
show_error(500, '无法获取配置,请联系站长!');
262262
console.error(e);
263-
}
263+
});
264264

265265
function main(routeCfg: any){
266266
if(app_destroyed) return;

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
vue()
88
],
99
build: {
10-
target: 'es6',
10+
target: 'es2020',
1111
rollupOptions: {
1212
output: {
1313
manualChunks(id){

0 commit comments

Comments
 (0)