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

bug: nuxt / vue hydration errors during v-for with SSR shadow: true components #6120

Closed
3 tasks done
johnjenkins opened this issue Jan 24, 2025 · 1 comment · Fixed by #6123
Closed
3 tasks done

bug: nuxt / vue hydration errors during v-for with SSR shadow: true components #6120

johnjenkins opened this issue Jan 24, 2025 · 1 comment · Fixed by #6123
Labels

Comments

@johnjenkins
Copy link
Contributor

Prerequisites

Stencil Version

Latest

Current Behavior

Vue places comment nodes (<!-- [ --> / <!-- ] -->) to mark the start and end position of it's for loops.

Stencil shadow: true components strip out comment nodes during client side hydration after SSR, breaking Vue's hydration.

Expected Behavior

Like scoped: true components, Stencil should retain comment nodes (in the same order they were originally placed).

System Info

Steps to Reproduce

https://github.com/johnjenkins/nuxt-stencil-testing

pnpm i
cd packages/stencil-components
pnpm build
cd ../nuxt-test
pnpm dev

There are 2 components used, one scoped: true and one shadow: true, both utilising vue's for loops.

The shadow component will throw a hydration error.

Code Reproduction URL

https://github.com/johnjenkins/nuxt-stencil-testing

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 24, 2025
@johnjenkins johnjenkins changed the title bug: nuxt / vue hydration errors with SSR shadow: true components during for loops bug: nuxt / vue hydration errors with SSR shadow: true components utilising for loops Jan 24, 2025
@johnjenkins johnjenkins changed the title bug: nuxt / vue hydration errors with SSR shadow: true components utilising for loops bug: nuxt / vue hydration errors during v-for with SSR shadow: true components Jan 24, 2025
@christian-bromann
Copy link
Member

This has been released in @stencil/[email protected]

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

Successfully merging a pull request may close this issue.

2 participants