-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.js
More file actions
40 lines (36 loc) · 1.24 KB
/
Copy pathsvelte.config.js
File metadata and controls
40 lines (36 loc) · 1.24 KB
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
import { mdsvex } from 'mdsvex';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-netlify';
import { autoImportInstagram } from './auto-import-instagram.js';
import { autoImportYouTube } from './auto-import-youtube.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
// if true, will create a Netlify Edge Function rather
// than using standard Node-based functions
edge: false,
// if true, will split your app into multiple functions
// instead of creating a single one for the entire app.
// if `edge` is true, this option cannot be used
split: false
}),
prerender: {
crawl: true,
entries: ['*'],
handleHttpError: ({ path, referrer, message }) => {
// Ignore Netlify Image CDN URLs during prerendering
// These only work on Netlify's CDN, not locally
if (path.startsWith('/.netlify/images')) {
return;
}
// For other errors, throw as usual
throw new Error(message);
}
}
},
extensions: ['.svelte', ...mdsvexConfig.extensions],
preprocess: [autoImportInstagram, autoImportYouTube, vitePreprocess(), mdsvex(mdsvexConfig)]
};
export default config;