File size: 1,025 Bytes
d6bd395
 
2ea068b
1f19ef0
d6bd395
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6b7f1b
d6bd395
 
 
 
 
 
 
2ea068b
d6bd395
 
 
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
29
30
31
32
33
// svelte.config.js

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

/** @type {import('@sveltejs/kit').Config} */
const config = {
    kit: {
        // 1. Use the static adapter
        adapter: adapter({
            // The folder where the static files will be placed. 
            // This is typically the default.
            pages: 'build', 
            assets: 'build',
            fallback: null, // Set a fallback if you need a 404/200 page
            precompress: false
        }),

        // 2. Set the base path
        // You MUST set the base path to your Space name on Hugging Face.
        // If your URL is `huggingface.co/spaces/user/my-gradio-app`, the path is `/my-gradio-app`.
        paths: {
            base: '/sat_ui',
        },

        // 3. Force Prerendering
        // This is the critical step to ensure all pages are compiled into static HTML.
        prerender: {
            entries: ['*'] // Tells SvelteKit to prerender every page it can find
        }
    }
};

export default config;