You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At work we use a couple of webcomponents (custom elements) from different teams. We chose webcomponents to be framework agnostic so they work everywhere. If these webcomponents render markup that markup gets removed on the client side when svelte takes over control. This does even happen, if I mark this component as custom element in vite (= has no effect, thus not included in reproducer):
Describe the bug
At work we use a couple of webcomponents (custom elements) from different teams. We chose webcomponents to be framework agnostic so they work everywhere. If these webcomponents render markup that markup gets removed on the client side when svelte takes over control. This does even happen, if I mark this component as custom element in vite (= has no effect, thus not included in reproducer):
Pointers in reproducer
The custom element gets defined in app.html and is used in +page.svelte.
Workaround
It works, if I wrap the component in
@html(I guess that disables the hydration):{@html '<my-component></my-component>'}Maybe that could be done automatically if svelte detects a custom element?
Other tries
I tested this even with sveltejs/svelte#8457 and it still happens. It would be nice, if this case could be considered in this PR.
Reproduction
Bildschirmaufzeichnung.vom.2023-04-19.09-54-12.webm
Logs
No response
System Info
System: OS: Linux 6.2 Arch Linux CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz Memory: 2.87 GB / 15.39 GB Container: Yes Shell: 5.9 - /usr/bin/zsh Binaries: Node: 19.9.0 - /usr/bin/node npm: 8.19.2 - /usr/bin/npm Browsers: Chromium: 112.0.5615.165 Firefox: 112.0.2 npmPackages: @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 @sveltejs/kit: ^1.5.0 => 1.15.5 svelte: ^3.54.0 => 3.58.0 vite: ^4.2.0 => 4.2.1Severity
annoyance
Additional Information
No response