feat: 重构插件初始化逻辑,简化应用启动流程并添加调试工具支持

This commit is contained in:
严浩
2025-01-08 09:35:21 +08:00
parent be321165c8
commit b70da8aad4
3 changed files with 30 additions and 27 deletions

View File

@@ -16,4 +16,17 @@ export function install({ app }: { app: import('vue').App<Element> }) {
// 2. 显示全局错误提示
// 3. 进行错误分析和处理
};
if (import.meta.env.MODE === 'development' && '1' === ('2' as never)) {
// TODO: https://github.com/hu3dao/vite-plugin-debug/
// https://eruda.liriliri.io/zh/docs/#快速上手
import('eruda').then(({ default: eruda }) => {
eruda.init({
defaults: {
transparency: 0.9,
},
});
/* eruda.show(); */
});
}
}