fix: When refreshing the page, the topic is wrong

This commit is contained in:
vben
2024-05-25 22:43:22 +08:00
parent 352119cc3a
commit f2644dbbc5
11 changed files with 38 additions and 24 deletions

View File

@@ -6,17 +6,16 @@ import { overridesPreference } from './preference';
* 应用初始化完成之后再进行页面加载渲染
*/
async function initApplication() {
const namespace = 'antd-view';
const env = import.meta.env.PROD ? 'prod' : 'dev';
const namespace = `${import.meta.env.VITE_APP_NAMESPACE}-${env}`;
// app偏好设置初始化
await setupPreference({
env,
namespace,
overrides: overridesPreference,
});
import('./bootstrap').then((m) => m.bootstrap(namespace, env));
import('./bootstrap').then((m) => m.bootstrap(namespace));
}
initApplication();