UNPKG

nuxt

Version:

Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.

17 lines (16 loc) 472 B
import { defineNuxtPlugin } from "../nuxt.js"; import { onNuxtReady } from "../composables/ready.js"; import { useRouter } from "../composables/router.js"; export default defineNuxtPlugin(() => { const router = useRouter(); onNuxtReady(() => { router.beforeResolve(async () => { await new Promise((resolve) => { setTimeout(resolve, 100); requestAnimationFrame(() => { setTimeout(resolve, 0); }); }); }); }); });