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.

10 lines (9 loc) • 367 B
import { getCurrentInstance } from "vue"; //#region src/app/composables/server-prefetch.ts /** Client-side `onServerPrefetch`, which only keeps the component a `useId()` async boundary. */ function onServerPrefetch(target = getCurrentInstance()) { const instance = target; if (instance && !instance.sp) instance.sp = []; } //#endregion export { onServerPrefetch };