mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-23 11:52:38 +00:00
15 lines
376 B
TypeScript
15 lines
376 B
TypeScript
import { defineNuxtPlugin } from '../nuxt'
|
|
|
|
export default defineNuxtPlugin({
|
|
name: 'nuxt:webpack-preload',
|
|
setup (nuxtApp) {
|
|
nuxtApp.vueApp.mixin({
|
|
beforeCreate () {
|
|
const { _registeredComponents } = this.$nuxt.ssrContext
|
|
const { __moduleIdentifier } = this.$options
|
|
_registeredComponents.add(__moduleIdentifier)
|
|
},
|
|
})
|
|
},
|
|
})
|