Browse Source

add the build version

gdias 1 tháng trước cách đây
mục cha
commit
7181c90735
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      svelte.config.js

+ 8 - 1
svelte.config.js

@@ -6,7 +6,14 @@ const config = {
 		// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
 		runes: ({ filename }) => (filename.split(/[/\\]/).includes('node_modules') ? undefined : true)
 	},
-	kit: { adapter: adapter() }
+	kit: {
+		adapter: adapter({
+			// Generate a fallback HTML file so dynamic routes work when served statically
+			fallback: '200.html'
+		}),
+		// Disable automatic prerendering of routes since we rely on the fallback SPA behaviour
+		prerender: { entries: [] }
+	}
 };
 
 export default config;