Created
April 11, 2024 13:11
-
-
Save HydrangeaPurple/512ec53e03086dbb11c52b7c78387d50 to your computer and use it in GitHub Desktop.
[vue在main.ts中校验全部的组件之间的import依赖] #vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 校验组件之间的依赖 在 main.ts 中 | |
const components: Record<string, any> = import.meta.glob('./incomp/**/*.vue', { eager: false }); | |
for (const path in components) { | |
await components[path](); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment