mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-17 00:05:56 +03:00
The eager `import.meta.glob` was statically pulling all 13 locale JSON files into the main bundle, defeating the sibling lazy glob and emitting INEFFECTIVE_DYNAMIC_IMPORT warnings. Statically import only the en-US fallback, lazy-load the rest, and await `readyI18n()` in each entry before mount so the first paint still uses the active locale.
22 lines
640 B
JavaScript
22 lines
640 B
JavaScript
import { createApp } from 'vue';
|
|
import Antd, { message } from 'ant-design-vue';
|
|
import 'ant-design-vue/dist/reset.css';
|
|
|
|
import { setupAxios } from '@/api/axios-init.js';
|
|
import '@/composables/useTheme.js';
|
|
import { i18n, readyI18n } from '@/i18n/index.js';
|
|
import { applyDocumentTitle } from '@/utils';
|
|
import ApiDocsPage from '@/pages/api-docs/ApiDocsPage.vue';
|
|
|
|
setupAxios();
|
|
applyDocumentTitle();
|
|
|
|
const messageContainer = document.getElementById('message');
|
|
if (messageContainer) {
|
|
message.config({ getContainer: () => messageContainer });
|
|
}
|
|
|
|
readyI18n().then(() => {
|
|
createApp(ApiDocsPage).use(Antd).use(i18n).mount('#app');
|
|
});
|