Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

SvelteKit doesn't deploy properly, what do I change?

$
0
0

I developed and app in SvelteKit, and I wanna deploy it as a static site. This is my SSG adapter configuration I got from the documentation.

const config={    kit: {        adapter: adapter({            // default options are shown. On some platforms            // these options are set automatically — see below            pages: 'build',            assets: 'build',            fallback: undefined,            precompress: false,            strict: false        })    }};

The problem here is that when I try 'npm run build' it puts up a bunch of files but no HTML or CSS files, also when I try npm run preview it can't find the main CSS file. If I change strict to true it gives me an error that I should prerender routes. If I export const prerender = true; in +page.svelte it ignores it, I created +page.js specially for that line but it gives me another error:

node:internal/event_target:1010process.nextTick(() => { throw err; });Error: 404 /src/app.css (linked from /)

How do I navigate this?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>