use defineAsyncComponent.
This commit is contained in:
parent
23d987478b
commit
07e0e38ad4
|
@ -13,7 +13,7 @@ if (localStorage.getItem('accounts') != null) {
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
import { computed, createApp, watch, markRaw, version as vueVersion } from 'vue';
|
import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue';
|
||||||
import compareVersions from 'compare-versions';
|
import compareVersions from 'compare-versions';
|
||||||
import JSON5 from 'json5';
|
import JSON5 from 'json5';
|
||||||
|
|
||||||
|
@ -168,14 +168,14 @@ fetchInstanceMetaPromise.then(() => {
|
||||||
initializeSw();
|
initializeSw();
|
||||||
});
|
});
|
||||||
|
|
||||||
const app = createApp(await (
|
const app = createApp(defineAsyncComponent(() =>
|
||||||
window.location.search === '?zen' ? import('@/ui/zen.vue') :
|
window.location.search === '?zen' ? import('@/ui/zen.vue') :
|
||||||
!$i ? import('@/ui/visitor.vue') :
|
!$i ? import('@/ui/visitor.vue') :
|
||||||
ui === 'deck' ? import('@/ui/deck.vue') :
|
ui === 'deck' ? import('@/ui/deck.vue') :
|
||||||
ui === 'desktop' ? import('@/ui/desktop.vue') :
|
ui === 'desktop' ? import('@/ui/desktop.vue') :
|
||||||
ui === 'classic' ? import('@/ui/classic.vue') :
|
ui === 'classic' ? import('@/ui/classic.vue') :
|
||||||
import('@/ui/universal.vue')
|
import('@/ui/universal.vue')
|
||||||
).then(x => x.default));
|
));
|
||||||
|
|
||||||
if (_DEV_) {
|
if (_DEV_) {
|
||||||
app.config.performance = true;
|
app.config.performance = true;
|
||||||
|
|
Loading…
Reference in New Issue