import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	preprocess: vitePreprocess(),
	kit: { adapter: adapter() },
	csp: {
		mode: 'hash',
		directives: {
			'default-src': ["'self'"],
			'script-src': ["'self'"],
			'style-src': ["'self'"],
			'img-src': ["'self'", 'data:'],
			'connect-src': ["'self'", 'https://www.googleapis.com'],
			'font-src': ["'self'"],
			'object-src': ["'none'"],
			'frame-ancestors': ["'none'"],
			'base-uri': ["'self'"],
			'form-action': ["'self'"]
		},
	}
};

export default config;
