-
Notifications
You must be signed in to change notification settings - Fork 789
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: client-side hydration of pre-rendered web component is broken for bundles that use dist-custom-element
#3319
Comments
I'm more than happy to work on this bug. Please let me know if you can point me to a good starting point for debugging this issue. |
👋 It's been a while since I've opened this ticket and I'd be more than grateful if someone could take a look at this quickly and point me in a direction. Thank you. |
Hey @weaintplastic - sorry about that! This somehow slipped through the cracks. I'm going to label this to get it ingested into our internal backlog for someone on the team to take a closer look and get an idea for what's going on here. |
@rwaskiewicz Thanks for picking up this issue. I've just upgraded the project to reproduce the bug to the latest version of Stencil 2.17.0 Again, I'm happy to support you fixing the bug if you can point me in a direction. |
Hello 👋. It's been a while and I wanted to check in if there is any news on this. If possible, you could give me a thought-starter on where to start debugging and I'll try my best to fix it. |
@rwaskiewicz do you have any news on this one? I would be happy to pick this up again. |
This issue is still present in the latest version of Stencil (4.0.2 at the time of posting) and effectively breaks many components that have been rendered on the server with the hydrate app as soon as they are being reconciliated in the client. Is there any way to get some traction on this, or can someone point us into the right direction so that we can look into it and potentially provide a fix? |
@rwaskiewicz Can you please look into this?? |
Hey folks, Please do me a favor and add 👍's to the issue summary to upvote it instead of "+1" style comments or "at-ing" members of the team. GitHub doesn't give us an easy way to track those types of comments, which makes them more likely to not be properly counted when we prioritize issues. Thanks! |
We have done some research and found a potential fix for this. We are in the process of preparing another, more current reproduction, with findings and a proposal on how to fix it. If you have any tips or guidance on how to best pack this up please let us know. |
@mhoritani Is there any estimate or workaround for this issue?? |
Hi @rwaskiewicz , |
Howdy @andrew9994, thanks for taking a stab at this! I was curious if there was a reason you (or anyone else running into this) want/need to consume the |
Hey @tanner-reits , we have some apps which handle the bundling/tree-shaking and registration of the components themselves. That's why we are utilizing the |
@andrew9994 We haven't encountered any repercussions in the brief testing we've done so far. We were just trying to gain some context and cover our bases as we look at the changes. So thanks for providing that! I don't think we need to go as far as a separate hydrate app, so no worries there. I'll bring this back to the team for some internal discussion and we'll do some more testing/digging. We'll post any follow-up questions or discussions here! Thanks for your patience and contribution! |
@tanner-reits, cool, thanks for the heads-up! Let me know if there is anything I can do to help your team move forward with this. |
The fix for this was published in today's release! |
Prerequisites
Stencil Version
2.15.0
Current Behavior
It seems that the client-side hydration of pre-rendered web components leads to different results when comparing the use of Stencil's
dist
bundle and a custom bundle based ondist-custom-elements
output.Pre-rendered HTML
After client-side hydration with Stencil's
dist
bundle, the html looks correct and is working as expected.After client-side hydration with the custom
app
bundle that is using Stencil'sdist-custom-elements
distribution, the html looks very different due to the slotted content not being hydrated correctly.Expected Behavior
I'd expect the client-side hydrated results to be exactly the same and slots are resolved correctly.
Steps to Reproduce
I've set up a project to reproduce the bug in two different scenarios and included a thorough description on how to reproduce there.
https://github.com/weaintplastic/stencil-hydrate-bug-demo/blob/main/readme.md
Code Reproduction URL
https://github.com/weaintplastic/stencil-hydrate-bug-demo
Additional Information
I've been trying the same with the deprecated
dist-custom-elements-bundle
but facing the same issue there. So it is not a problem ofdist-custom-elements
output specifically.The text was updated successfully, but these errors were encountered: