-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathsvelte.config.js
More file actions
34 lines (30 loc) · 834 Bytes
/
Copy pathsvelte.config.js
File metadata and controls
34 lines (30 loc) · 834 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
33
34
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import { fileURLToPath } from 'node:url';
const dev = process.env.NODE_ENV !== 'production';
// mdsvex reads the layout from disk and injects it as an import, so it needs a
// real absolute path (it does not resolve the $lib alias).
const mdLayout = fileURLToPath(new URL('./src/lib/components/MarkdownLayout.svelte', import.meta.url));
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.md'],
preprocess: [
vitePreprocess(),
mdsvex({
extensions: ['.md'],
layout: {
_: mdLayout
}
})
],
kit: {
adapter: adapter({
fallback: '404.html'
}),
paths: {
base: dev ? '' : '/Anki-xiehanzi'
}
}
};
export default config;