import adapter from '@sveltejs/adapter-cloudflare-workers';
import preprocess from 'svelte-preprocess';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
const config = {
    // Consult https://github.com/sveltejs/svelte-preprocess
    // for more information about preprocessors
    preprocess: [
        vitePreprocess({
            script: true,
            style: true,
        })
    ],
    kit: {
        adapter: adapter(),
        csp: {
            directives: {
                'script-src': ['self', 'https://coturnix.fr/' ],
            },
            mode: 'auto',
        },
        paths: {
            base: "/faisan",
            relative: false
        }
    }
};

export default config;