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

fix(ssr): stop stripping comment nodes #6123

Merged

Conversation

johnjenkins
Copy link
Contributor

@johnjenkins johnjenkins commented Jan 27, 2025

What is the current behavior?

client-hydrate.ts is currently stripping out extra comment nodes of shadow: true components (this was originally to remove stencil's "internal" comments, which could pollute the component), but in doing so it removes slotted comment nodes which can be used by external tools / libs.

After testing, I see stencil's internal comments are removed during other stages of client-side hydration so this extra comment removal is unnecessary (the only time extra comments are seen is during unit tests due to a limitation / difference in how components are rendered on 'server')

GitHub Issue Number: #6120

What is the new behavior?

Fixes #6120

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

  • New unit test
  • New wdio test

Other information

@johnjenkins johnjenkins requested a review from a team as a code owner January 27, 2025 15:14
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

🙌

@christian-bromann christian-bromann merged commit 5a7ab24 into ionic-team:main Jan 27, 2025
71 checks passed
@johnjenkins johnjenkins deleted the fix-ssr-shadow-comments branch January 27, 2025 17:12
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

Successfully merging this pull request may close these issues.

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