Having issues with svelte renders on netlify build

Hello!
I’m about to finish this and I found an odd obstacle any input will be greatly appreciated.

my domain (here in netlify): www.tetrabids.com

issue:
I’m using svelte with routify for a small and simple landing page, everything working on local and start checking that everything works in netlify but it seems that I have an issue with components rendering (for half a second in most cases) when they are not suppose to.

<svelte:window bind:innerWidth={windowsWidth} />

this appears to be the problem, this is a special tag that handles reactively the width of the screen, is works by putting it in the first line of the dom and it does the rest, thing that does in local, but after deployed I believe it gets stripped out or moved and causes that some conditionals are trigger before this is resolve (*just a guess could be anything else)

  {#if windowsWidth > maxWidthTablet && windowsWidth != undefined}
      <div class="col-2">
        <img
          class="slide-in-right"
          src="./images/laptop.svg"
          alt="Laptop with code on the screen"
        />
      </div>
    {/if}

this for example, I tried to move things around and it keep happening now from mobile, any idea would be great, my guess on netlify doing something is over that it works in local as it should, and if the conditionals run over a non client variable (like directly true) this does not happens.

if anyone can check over this would be great

Hey there, @soyrbto :wave:

Sorry for the delayed response! Thank you for writing such a thorough post.

Are you still encountering this issue? If you are, what additional debugging steps have you taken in the past week? Have you checked out any of our Support Guides that discuss pre-rendering?

Please let us know! If you are, I will get some eyes on this.

Hello @hillary thanks for taking the time to read the post, I actually started serving the site locally and notice the same issue, so it is not related to netlify, still thanks for be supportive, have a great day!

1 Like

Hi there, @soyrbto :wave:

Thanks for following up and for the kind words! Glad you have identified where the issue is coming from. :netliconfetti: