Nuxt/packages/app/src/plugins/preload.server.ts

12 lines
307 B
TypeScript
Raw Normal View History

import type { Plugin } from 'nuxt/app'
export default <Plugin> function preload ({ app }) {
app.mixin({
beforeCreate () {
const { _registeredComponents } = this.$nuxt.ssrContext
const { __moduleIdentifier } = this.$options
_registeredComponents.add(__moduleIdentifier)
}
})
}