refactor(nuxt): remove _registeredComponents from ssrContext (#27819)

This commit is contained in:
Julien Huang 2024-07-03 22:13:23 +02:00 committed by Daniel Roe
parent fceb74906d
commit a3476157ec
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B
2 changed files with 2 additions and 4 deletions

View File

@ -5,9 +5,9 @@ export default defineNuxtPlugin({
setup (nuxtApp) {
nuxtApp.vueApp.mixin({
beforeCreate () {
const { _registeredComponents } = this.$nuxt.ssrContext
const { modules } = this.$nuxt.ssrContext
const { __moduleIdentifier } = this.$options
_registeredComponents.add(__moduleIdentifier)
modules.add(__moduleIdentifier)
},
})
},

View File

@ -312,8 +312,6 @@ export default defineRenderHandler(async (event): Promise<Partial<RenderResponse
payload: (ssrError ? { error: ssrError } : {}) as NuxtPayload,
_payloadReducers: {},
modules: new Set(),
set _registeredComponents (value) { this.modules = value },
get _registeredComponents () { return this.modules },
islandContext,
}