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

12 lines
308 B
TypeScript
Raw Normal View History

2021-03-29 09:40:51 +00:00
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)
}
})
}