File size: 963 Bytes
1f19ef0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import adapter from '@sveltejs/adapter-static'; // Import the static adapter
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://kit.svelte.dev/docs/integrations#preprocessors
	// for more information about preprocessors
	preprocess: vitePreprocess(),

	kit: {
		// Use the static adapter for creating a static site
		adapter: adapter({
            // Output directory for the static files (default is 'build')
            pages: 'build',
            assets: 'build',
            fallback: 'index.html', // Necessary for single-page application (SPA) routing
            precompress: false,
            strict: true
        }),
        // Ensure static assets are served correctly
        paths: {
            // For root-level deployment on Hugging Face Pages
            base: process.env.NODE_ENV === 'production' ? '' : '', 
        }
	}
};

export default config;