Spaces:
Running
Running
| 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; |