import { createApp } from 'vue';
// import VConsole from 'vconsole';
import App from './App.vue';
import router from './router';
import { i18n } from './locales';
import { registerTDesignComponents } from './utils/tdesign';

// 所有环境开启 VConsole，方便移动端查看日志
// new VConsole();

const bootstrap = async () => {
  const app = createApp(App);

  // 按端动态加载 TDesign（JS + CSS），避免 PC / Mobile 两套样式互相污染
  await registerTDesignComponents(app);

  app.use(i18n);
  app.use(router);
  app.mount('#app');
};

void bootstrap();
