Closed
Description
Describe the feature
Server components (and islands) must have a single root element.
See https://nuxt.com/docs/guide/directory-structure/components#standalone-server-components
Maybe we just need to add a line here?
const fileSingleRoot = [
...(dirs.layouts?.map(layoutsDir => join(layoutsDir, `**/*.${GLOB_EXTS}`)) || []),
...(dirs.pages?.map(pagesDir => join(pagesDir, `**/*.${GLOB_EXTS}`)) || []),
+ ...(dirs.components?.map(componentsDir => join(componentsDir, `**/*.server.${GLOB_EXTS}`)) || []),
]
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Read the contribution guide.
- Check existing discussions and issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment