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
I have an Eleventy site that uses Svelte as it's template engine. I have an option flag to disable the client side JS bundle, which lead to me noticing that the UI is broken in some cases when only using the SSR'd version.
DOM elements are not rendered in correct places. It's hard to reproduce with the REPL since the bug is only apparent in the SSR version, so I took some screenshots of the generated html:
SSR:
(watch out for the duplicated <a> element)
Client:
The client version is correctly rendered, but the SSR version is not. It somehow duplicates the <a> element and misplaces other element.
However, since it's only happening in SSR, you can't really see the issue in the REPL.
Expected behavior
I expected the SSR version to match the client version in DOM structure.
Information about your Svelte project:
To make your life easier, just run npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers and paste the output here.
Your browser and the version: latest Chrome
Your operating system: Mac Os Mojave
Svelte version: 3.29.7
Rollup
Severity
Severe, out site is supposed to be a static site with only small amounts of JS sprinkled on top, so with this bug, I cannot use Svelte reliably.
The text was updated successfully, but these errors were encountered:
Seems like the problem was caused by nested <a> -elements. When nesting anchor tags, by mistake obviously, SSR bundle creates a different structure of DOM elements than the client bundle.
Describe the bug
I have an Eleventy site that uses Svelte as it's template engine. I have an option flag to disable the client side JS bundle, which lead to me noticing that the UI is broken in some cases when only using the SSR'd version.
DOM elements are not rendered in correct places. It's hard to reproduce with the REPL since the bug is only apparent in the SSR version, so I took some screenshots of the generated html:
SSR:
(watch out for the duplicated
<a>
element)Client:
The client version is correctly rendered, but the SSR version is not. It somehow duplicates the
<a>
element and misplaces other element.The code for this specific component is here:
To Reproduce
I made a REPL of another component in our site that suffered from the same problem: https://svelte.dev/repl/1c9a6d3326674f85b0b5246e209bf350?version=3.29.7
However, since it's only happening in SSR, you can't really see the issue in the REPL.
Expected behavior
I expected the SSR version to match the client version in DOM structure.
Information about your Svelte project:
To make your life easier, just run
npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers
and paste the output here.Your browser and the version: latest Chrome
Your operating system: Mac Os Mojave
Svelte version: 3.29.7
Rollup
Severity
Severe, out site is supposed to be a static site with only small amounts of JS sprinkled on top, so with this bug, I cannot use Svelte reliably.
The text was updated successfully, but these errors were encountered: