diff --git a/packages/frontend/src/_embed_boot_.ts b/packages/frontend/src/_embed_boot_.ts index bbd42905e3..836e6865b6 100644 --- a/packages/frontend/src/_embed_boot_.ts +++ b/packages/frontend/src/_embed_boot_.ts @@ -8,8 +8,9 @@ import 'vite/modulepreload-polyfill'; import '@/style.scss'; import '@/style.embed.scss'; +import { createApp, defineAsyncComponent } from 'vue'; +import { common } from '@/boot/common.js'; import type { CommonBootOptions } from '@/boot/common.js'; -import { subBoot } from '@/boot/sub-boot.js'; import { setIframeId, postMessageToParentWindow } from '@/scripts/post-message.js'; import { defaultStore } from '@/store.js'; @@ -35,7 +36,9 @@ window.addEventListener('message', event => { }); // 起動 -subBoot(bootOptions, true).then(() => { +common(() => createApp( + defineAsyncComponent(() => import('@/ui/embed.vue')), +), bootOptions).then(({ isClientUpdated }) => { // 起動完了を通知(このあとクライアント側から misskey:embedParent:registerIframeId が送信される) postMessageToParentWindow('misskey:embed:ready'); }); diff --git a/packages/frontend/src/boot/sub-boot.ts b/packages/frontend/src/boot/sub-boot.ts index ea6dce2d4d..12377366bc 100644 --- a/packages/frontend/src/boot/sub-boot.ts +++ b/packages/frontend/src/boot/sub-boot.ts @@ -7,8 +7,8 @@ import { createApp, defineAsyncComponent } from 'vue'; import { common } from './common.js'; import type { CommonBootOptions } from './common.js'; -export async function subBoot(options?: Partial, isEmbedPage?: boolean) { +export async function subBoot(options?: Partial) { const { isClientUpdated } = await common(() => createApp( - defineAsyncComponent(() => isEmbedPage ? import('@/ui/embed.vue') : import('@/ui/minimum.vue')), + defineAsyncComponent(() => import('@/ui/minimum.vue')), ), options); }