admin-vben5/apps/antd-view/src/main.ts

23 lines
505 B
TypeScript
Raw Normal View History

2024-05-24 23:11:03 +08:00
import { setupPreference } from '@vben/preference';
2024-05-19 21:20:42 +08:00
import { overridesPreference } from './preference';
2024-05-24 23:11:03 +08:00
/**
*
*/
async function initApplication() {
const namespace = 'antd-view';
const env = import.meta.env.PROD ? 'prod' : 'dev';
// app偏好设置初始化
2024-05-19 21:20:42 +08:00
await setupPreference({
2024-05-24 23:11:03 +08:00
env,
namespace,
2024-05-19 21:20:42 +08:00
overrides: overridesPreference,
});
2024-05-24 23:11:03 +08:00
import('./bootstrap').then((m) => m.bootstrap(namespace, env));
2024-05-19 21:20:42 +08:00
}
2024-05-24 23:11:03 +08:00
initApplication();