-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
32 lines (29 loc) · 787 Bytes
/
Copy pathsvelte.config.js
File metadata and controls
32 lines (29 loc) · 787 Bytes
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
import adapterAuto from '@sveltejs/adapter-auto';
import adapterCloudflare from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const isDeployingToCloudflare = process.env.ADAPTER === 'cloudflare';
const adapter = isDeployingToCloudflare
? adapterCloudflare()
: adapterAuto({
routes: {
include: ['/*'],
exclude: ['<all>']
}
});
export default {
kit: {
adapter,
prerender: {
entries: ['*'] // This ensures all dynamic routes are prerendered
}
},
hooks: { // Custom build logging
buildStart() {
console.log('SvelteKit build is starting...');
},
buildEnd() {
console.log('SvelteKit build has finished.');
},
},
preprocess: [vitePreprocess({})]
};