docs: use .default with dynamic imports

pull/3248/head
Divyansh Singh 1 year ago committed by GitHub
parent 00b5aea9eb
commit 46966ac14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@ export default {
async enhanceApp({ app }) { async enhanceApp({ app }) {
if (!import.meta.env.SSR) { if (!import.meta.env.SSR) {
const plugin = await import('plugin-that-access-window-on-import') const plugin = await import('plugin-that-access-window-on-import')
app.use(plugin) app.use(plugin.default)
} }
} }
} }
@ -74,7 +74,7 @@ export default {
async enhanceApp({ app }) { async enhanceApp({ app }) {
if (!import.meta.env.SSR) { if (!import.meta.env.SSR) {
const plugin = await import('plugin-that-access-window-on-import') const plugin = await import('plugin-that-access-window-on-import')
app.use(plugin) app.use(plugin.default)
} }
} }
} satisfies Theme } satisfies Theme

Loading…
Cancel
Save