svelte.config.js 612 B

12345678910111213141516171819
  1. import adapter from '@sveltejs/adapter-static';
  2. /** @type {import('@sveltejs/kit').Config} */
  3. const config = {
  4. compilerOptions: {
  5. // Force runes mode for the project, except for libraries. Can be removed in svelte 6.
  6. runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true)
  7. },
  8. kit: {
  9. adapter: adapter({
  10. // Generate a fallback HTML file so dynamic routes work when served statically
  11. fallback: '200.html'
  12. }),
  13. // Disable automatic prerendering of routes since we rely on the fallback SPA behaviour
  14. prerender: { entries: [] }
  15. }
  16. };
  17. export default config;