Svelte + Netlify issue

Hello all. I recently made a post about how my site was giving a 404 whenever I moved my site to a new github repo code that was built using svelte.

After some help I was able to determine that because my index.html was in my public folder in my repo, I needed to add public to the publish directory. This finally fixed the “ page not found issue” however more issue arose.

I used svelte to create a splash screen animation. This animation is in the src folder of my directory in the app.svelte file.

Whenever I load my website, the svelte animation does not render. Also, because of how my splash screen works, I disable scrolling until after the animation is complete, and thus, because there is no animation, the page remains with a hidden overflow ( no scroll ).

If someone could help me understand what is going on and why my app.svelte animation isn’t rendering, I would be thankful.

I think that the main point that will help you solve this is that All assets for your site must end up somewhere under the publish directory. Perhaps you can move the src/ directory into it so that those assets are present?

Maybe these images will help you understand my structure

I am new to deploying on GitHub. All other netlify deploys worked fine ( including a gridsome deploy ), but I am having issues with a svelte deploy.

I actually thought about moving the “src” folder into my “public folder” and doing it that way. Would that work?

Hey there! Do you see any errors in the console when you load the site?

If you’re able to share the GitHub repo you’re deploying, that’s also really helpful to see if we can spot the issue.


Yes I have 404 errors…


Is it okay If I PM you the github ?

Bumping post to still get some info on how to fix that.

The errors you’re getting imply that the assets aren’t being built into the output folder.

As a test, try moving the assets to your build folder and see if the 404s continue. If that solves it, I’d recommend looking into how Svelte recommends copying assets to the output folder during builds.

Have you been able to resolve this issues? Running into the exact same problem that css and js chunks / files cannot be found.