Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to 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

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

nuxt-studio bot commented Mar 13, 2024

βœ… Live Preview ready!

Name Edit Preview Latest Commit
Nuxt Docs Edit on Studio β†—οΈŽ View Live Preview a26964d

@@ -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')
Copy link
Member

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

Copy link
Member Author

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 &&

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh indeed !

@danielroe danielroe changed the title refactor: move component islands flag to nuxt.config.mjs feat: enable component islands when server pages/components are present Mar 13, 2024
@danielroe danielroe changed the title feat: enable component islands when server pages/components are present feat(nuxt): enable component islands when server pages/components are present Mar 13, 2024
Copy link
Member

@huang-julien huang-julien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❀️

@danielroe danielroe merged commit 9bfd988 into main Mar 13, 2024
@danielroe danielroe deleted the feat/enabled-component-islands branch March 13, 2024 14:39
@github-actions github-actions bot mentioned this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants