fix: globEager deprecated (#439)

* fix: globEager deprecated

* Update .vscode/settings.json

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>

---------

Co-authored-by: 悠静萝莉 <i@mikuhl.cn>
This commit is contained in:
Henry 2023-03-07 11:21:04 +08:00 committed by GitHub
parent ca0abd6ba0
commit 715e882451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

11
.vscode/settings.json vendored
View File

@ -21,5 +21,14 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint" "editor.defaultFormatter": "dbaeumer.vscode-eslint"
}, },
"cSpell.words": ["tdesign", "tvision", "echarts", "nprogress", "commitlint", "stylelint", "pinia", "qrcode"] "cSpell.words": [
"tdesign",
"tvision",
"echarts",
"nprogress",
"commitlint",
"stylelint",
"pinia",
"qrcode"
],
} }

View File

@ -4,10 +4,10 @@ import uniq from 'lodash/uniq';
const env = import.meta.env.MODE || 'development'; const env = import.meta.env.MODE || 'development';
// 导入homepage相关固定路由 // 导入homepage相关固定路由
const homepageModules = import.meta.globEager('./modules/**/homepage.ts'); const homepageModules = import.meta.glob('./modules/**/homepage.ts', { eager: true });
// 导入modules非homepage相关固定路由 // 导入modules非homepage相关固定路由
const fixedModules = import.meta.globEager('./modules/**/!(homepage).ts'); const fixedModules = import.meta.glob('./modules/**/!(homepage).ts', { eager: true });
// 其他固定路由 // 其他固定路由
const defaultRouterList: Array<RouteRecordRaw> = [ const defaultRouterList: Array<RouteRecordRaw> = [