-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat(nuxt): enable component islands when server pages/components are present #26223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
β Live Preview ready!
|
@@ -374,10 +374,13 @@ export const nuxtConfigTemplate: NuxtTemplate = { | |||
baseURL: undefined, | |||
headers: undefined | |||
} | |||
const shouldEnableComponentIslands = ctx.nuxt.options.experimental.componentIslands && ( | |||
ctx.nuxt.options.dev || ctx.nuxt.options.experimental.componentIslands !== 'auto' || ctx.app.pages?.some(p => p.mode === 'server') || ctx.app.components?.some(c => c.mode === 'server') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.nuxt.options.experimental.componentIslands !== 'auto'
we can set false
to componentIsland
, not sure if anyone does that but it can enable island
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first check prevents that - ctx.nuxt.options.experimental.componentIslands &&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh indeed !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β€οΈ
π Linked issue
β Type of change
π Description
This enables components whenever there are components with
mode: server
or server pages. The setting is 'auto'. (It won't affect bundle size when these aren't used.)π Checklist