chore: fix build error

This commit is contained in:
Anthony Fu 2022-12-27 20:19:47 +01:00
parent 8f68fa12e4
commit 2d4f5ddf76

View file

@ -1,7 +1,6 @@
import { pwaInfo } from 'virtual:pwa-info'
import type { Link } from '@unhead/schema'
import type { Directions } from 'vue-i18n-routing'
import { init as initEmojis } from 'emoji-mart'
import { APP_NAME, STORAGE_KEY_LANG } from '~/constants'
import type { LocaleObject } from '#i18n'
@ -76,8 +75,10 @@ export async function setupI18n() {
})
}
export function setupEmojis() {
initEmojis({
data: () => import('@emoji-mart/data').then(r => r.default),
export async function setupEmojis() {
const promise = import('@emoji-mart/data').then(r => r.default)
const { init } = await import('emoji-mart')
init({
data: () => promise,
})
}