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.

15 lines (14 loc) 445 B
import { defineNuxtPlugin } from "../nuxt.js"; //#region src/app/plugins/preload.server.ts const plugin = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:webpack-preload", setup(nuxtApp) { nuxtApp.vueApp.mixin({ beforeCreate() { const { modules } = this.$nuxt.ssrContext; const { __moduleIdentifier } = this.$options; if (__moduleIdentifier) modules.add(__moduleIdentifier); } }); } }); //#endregion export { plugin as default };