svelte.config.js

import adapter from '@sveltejs/adapter-static';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter(),
		// Override http methods in the Todo forms
		methodOverride: {
			allowed: ['PATCH', 'DELETE']
		},
		files: {
			// Override default lib folder
			lib: 'src/components'
		},
		browser: {
			hydrate: false,
			router: false
		},
		prerender: {
			crawl: true,
			enabled: true,
			entries: ['*'],
			default: true,
			onError: ({ status, path, referrer, referenceType }) => {
				if (path.startsWith('/blog')) throw new Error('Missing a blog page!');
				console.warn(`${status} ${path}${referrer ? ` (${referenceType} from ${referrer})` : ''}`);
			}
		},
		trailingSlash: 'never'
	}
};

export default config;