import { unmountGlobalLoading } from '@vben/utils'; const space = () => { const env = import.meta.env.PROD ? 'prod' : 'dev'; const appVersion = import.meta.env.VITE_APP_VERSION; return `${import.meta.env.VITE_APP_NAMESPACE}:${appVersion}:${env}`; }; (async function (space) { // 初始化偏好设置 const { default: initPreferences } = await import('./preferences'); await initPreferences(space); // 启动应用并挂载 const { default: bootstrap } = await import('./bootstrap'); await bootstrap(space); // 移除并销毁loading unmountGlobalLoading(); })(space());