// Configured by `agentuity project create` to deploy on the
// Agentuity Cloud's Node container runtime via SvelteKit's
// adapter-node. Replaces sv's default adapter-auto so production
// builds produce a self-listening Node entry at `build/index.js`.
import adapter from '@sveltejs/adapter-node';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	compilerOptions: {
		// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
		runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true),
	},
	kit: {
		adapter: adapter(),
		paths: {
			relative: false,
		},
	},
};

export default config;
