-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsvelte.config.js
44 lines (39 loc) · 939 Bytes
/
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
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
import adapter from '@sveltejs/adapter-static';
const handleError = ({
status,
path,
referrer,
referenceType,
}) => {
console.warn(`${status} ${path}${referrer ? ` (${referenceType} from ${referrer})` : ''}`);
};
const config = {
extensions: [ '.svelte', ...mdsvexConfig.extensions ],
// ssr: true
kit: {
target: '#svelte',
adapter: adapter({
pages: 'dist',
assets: 'dist',
fallback: null,
}),
prerender: {
crawl: true,
enabled: true,
entries: [ '*', '/ru/', '/en/', '/en/blog/policy/', '/ru/blog/policy/', '/en/blog/terms-of-use/', '/ru/blog/terms-of-use/' ],
onError: handleError,
},
trailingSlash: 'always',
},
preprocess: [
preprocess({
postcss: true,
}),
mdsvex(mdsvexConfig),
],
};
export default config;