-
Notifications
You must be signed in to change notification settings - Fork 2
/
svelte.config.js
52 lines (43 loc) · 1.29 KB
/
svelte.config.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import adapter from '@sveltejs/adapter-vercel';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import { mdsvex } from 'mdsvex';
import { preprocessMeltUI, sequence } from '@melt-ui/pp';
import mdsvexOptions from './mdsvex.config.js';
// Add SASS
// https://joshcollinsworth.com/blog/build-static-sveltekit-markdown-blog#adding-sass-to-sveltekit
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md', '.mdx'],
preprocess: sequence([
vitePreprocess(),
mdsvex(mdsvexOptions),
preprocessMeltUI(),
]),
// https://kit.svelte.dev/docs/adapter-vercel#incremental-static-regeneration
// https://vercel.com/docs/frameworks/sveltekit#incremental-static-regeneration-isr
isr: {
expiration: 60,
},
kit: {
// See https://kit.svelte.dev/docs/adapter-auto
// Also https://kit.svelte.dev/docs/adapters
adapter: adapter({
split: true,
// Use server-side rendering in Vercel's Node.js 18.x serverless runtime
runtime: 'nodejs18.x',
}),
alias: {
$components: './src/lib/components',
$styles: './src/styles',
$utils: './src/lib/utils',
},
},
// vitePlugin: {
// inspector: {
// toggleKeyCombo: 'meta-shift',
// showToggleButton: 'always',
// toggleButtonPos: 'bottom-right',
// },
// },
};
export default config;