| | |
| | | import '/@/design/index.less'; |
| | | import '@virtual/windi.css'; |
| | | |
| | | import { createApp } from 'vue'; |
| | | // Register windi |
| | | import 'virtual:windi.css'; |
| | | // Register icon sprite |
| | | import 'virtual:svg-icons-register'; |
| | | |
| | | import App from './App.vue'; |
| | | |
| | | import router, { setupRouter } from '/@/router'; |
| | | import { createApp } from 'vue'; |
| | | import { initAppConfigStore } from '/@/logics/initAppConfig'; |
| | | import { setupErrorHandle } from '/@/logics/error-handle'; |
| | | import { router, setupRouter } from '/@/router'; |
| | | import { setupRouterGuard } from '/@/router/guard'; |
| | | import { setupStore } from '/@/store'; |
| | | import { setupErrorHandle } from '/@/logics/error-handle'; |
| | | import { setupGlobDirectives } from '/@/directives'; |
| | | import { setupI18n } from '/@/locales/setupI18n'; |
| | | import { registerGlobComp } from '/@/components/registerGlobComp'; |
| | | |
| | | // Register icon Sprite |
| | | import 'vite-plugin-svg-icons/register'; |
| | | |
| | | // Do not introduce` on-demand in local development? |
| | | // In the local development for on-demand introduction, the number of browser requests will increase by about 20%. |
| | | // Do not introduce on-demand in local development? |
| | | // In the local development for introduce on-demand, the number of browser requests will increase by about 20%. |
| | | // Which may slow down the browser refresh. |
| | | // Therefore, all are introduced in local development, and only introduced on demand in the production environment |
| | | if (import.meta.env.DEV) { |
| | | import('ant-design-vue/dist/antd.less'); |
| | | } |
| | | |
| | | (async () => { |
| | | async function bootstrap() { |
| | | const app = createApp(App); |
| | | |
| | | // Configure vuex store |
| | | // Configure store |
| | | setupStore(app); |
| | | |
| | | // Initialize internal system configuration |
| | | initAppConfigStore(); |
| | | |
| | | // Register global components |
| | | registerGlobComp(app); |
| | |
| | | await router.isReady(); |
| | | |
| | | app.mount('#app', true); |
| | | } |
| | | |
| | | if (import.meta.env.DEV) { |
| | | window.__APP__ = app; |
| | | } |
| | | })(); |
| | | void bootstrap(); |