import { defineNuxtPlugin } from "../nuxt.js";
export default 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);
        }
      }
    });
  }
});
