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

This commit is contained in:
Julien Huang 2024-07-03 22:13:23 +02:00 committed by GitHub
parent 79193561b9
commit 0be6929523
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

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

View File

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