-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
63 lines (59 loc) 路 1.11 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
53
54
55
56
57
58
59
60
61
62
63
import preprocess from 'svelte-preprocess'
import adapter from '@sveltejs/adapter-vercel'
import { vitePreprocess } from '@sveltejs/kit/vite'
import { mdsvex } from 'mdsvex'
import slug from 'rehype-slug'
import autolink from 'rehype-autolink-headings'
import { importAssets } from 'svelte-preprocess-import-assets'
import toc from 'remark-toc'
const mdsvex_config = {
layout: 'src/routes/(blog)/post.svelte',
remarkPlugins: [
[
toc,
{
tight: true,
},
],
],
rehypePlugins: [
slug,
[
autolink,
{
properties: {
class: 'autolink-header',
},
content: [
{
type: 'element',
tagName: 'span',
properties: {
title: 'link to this header',
},
children: [{ type: 'text', value: '#' }],
},
],
},
],
],
}
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.svx'],
preprocess: [
vitePreprocess(),
mdsvex(mdsvex_config),
preprocess({
postcss: true,
}),
importAssets(),
],
kit: {
adapter: adapter({ runtime: 'edge' }),
},
vitePlugin: {
inspector: true,
},
}
export default config