main.ts 597 B

1234567891011121314151617181920
  1. import { unmountGlobalLoading } from '@vben/utils';
  2. const space = () => {
  3. const env = import.meta.env.PROD ? 'prod' : 'dev';
  4. const appVersion = import.meta.env.VITE_APP_VERSION;
  5. return `${import.meta.env.VITE_APP_NAMESPACE}:${appVersion}:${env}`;
  6. };
  7. (async function (space) {
  8. // 初始化偏好设置
  9. const { default: initPreferences } = await import('./preferences');
  10. await initPreferences(space);
  11. // 启动应用并挂载
  12. const { default: bootstrap } = await import('./bootstrap');
  13. await bootstrap(space);
  14. // 移除并销毁loading
  15. unmountGlobalLoading();
  16. })(space());