-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
I haven't been able to create a simple repro for this unfortunately.
Tags inside <svelte:head> are being repeated in SSR output so any scripts defined there are getting loaded twice, e.g.:
<head>
<script src="/script.js"></script>
<script src="/script.js"></script>
</head>A console.trace from the top-level <script> of the component that has the <svelte:head> block indicates that that component is being "called" twice also. The trace stack leads to a do-while loop in the callback passed to internal.create_ssr_component, which seems to be implementing logic for repeatedly rendering components until the values of bound props are resolved ($$settled).
The code that directly causes the repetition seems to be $$result.head += ... added by src/compiler/compile/render_ssr/handlers/Head.ts.
tommywalkie, andrew-j-roberts, janosh, firattemel, jdgaravito and 1 more