// 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;