feat: add docker shell

This commit is contained in:
vben
2024-05-24 23:11:03 +08:00
parent d733987042
commit 38d58394e3
25 changed files with 394 additions and 120 deletions

View File

@@ -0,0 +1,33 @@
import '@vben/styles';
import { setupI18n } from '@vben/locales';
import { preference } from '@vben/preference';
import { setupStore } from '@vben/stores';
import { createApp } from 'vue';
import App from './app.vue';
import { router } from './router';
async function bootstrap(namespace: string, env: string) {
const app = createApp(App);
// 国际化 i18n 配置
await setupI18n(app, { defaultLocale: preference.locale });
// 配置 pinia-store
await setupStore(app, { env, namespace });
// 配置路由及路由守卫
app.use(router);
app.mount('#app');
// production mock server
if (import.meta.env.PROD) {
import('./mock-prod-server').then(({ setupProdMockServer }) => {
setupProdMockServer();
});
}
}
export { bootstrap };