Skip to content
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

[v2] broken functional components with multiple root #181

Open
lancetharper opened this issue Apr 6, 2021 · 1 comment
Open

[v2] broken functional components with multiple root #181

lancetharper opened this issue Apr 6, 2021 · 1 comment

Comments

@lancetharper
Copy link

Describe the bug
Functional components that render multiple root modules no longer work

To Reproduce
CodeSandbox

Steps to reproduce the behavior:

Component functional-a renders a single element (and is imported automatically).

Component functional-b throws an error about multiple root elements when imported automatically. If you uncomment the manual import and manually include the component in pages/index.vue it works correctly.

Expected behavior
Functional components can render multiple roots

Additional context
Discovered when I updated from nuxt 2.14.12 to 2.15.4

@pi0 pi0 changed the title Broken functional components [v2] broken functional components with multiple root Apr 6, 2021
@NozomuIkuta
Copy link
Contributor

NozomuIkuta commented May 19, 2021

I just folked and played around with the demo.

This bug can be avoided by setting components.loader: true.

CodeSandbox

Please note that there are some limitations or trade-off of lower performance in development mode, according to the authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants