fix(nuxt): do not include <NuxtWelcome> when building (#29956)

Co-authored-by: Julien Huang <julien.huang@outlook.fr>
This commit is contained in:
Daniel Roe 2024-11-17 16:48:26 -05:00 committed by GitHub
parent 4924e26329
commit 67456810be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -408,11 +408,15 @@ async function initNuxt (nuxt: Nuxt) {
} }
// Add <NuxtWelcome> // Add <NuxtWelcome>
addComponent({ // TODO: revert when deep server component config is properly bundle-split: https://github.com/nuxt/nuxt/pull/29956
name: 'NuxtWelcome', const islandsConfig = nuxt.options.experimental.componentIslands
priority: 10, // built-in that we do not expect the user to override if (nuxt.options.dev || !(typeof islandsConfig === 'object' && islandsConfig.selectiveClient === 'deep')) {
filePath: resolve(nuxt.options.appDir, 'components/welcome'), addComponent({
}) name: 'NuxtWelcome',
priority: 10, // built-in that we do not expect the user to override
filePath: resolve(nuxt.options.appDir, 'components/welcome'),
})
}
addComponent({ addComponent({
name: 'NuxtLayout', name: 'NuxtLayout',