-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvelte.config.cjs
More file actions
42 lines (37 loc) · 917 Bytes
/
svelte.config.cjs
File metadata and controls
42 lines (37 loc) · 917 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
35
36
37
38
39
40
41
42
const sveltePreprocess = require('svelte-preprocess');
const staticAdaptor = require('@sveltejs/adapter-static');
const pkg = require('./package.json');
const fs = require('fs');
const pages = [
'*',
'/404-hack.html',
fs.readdirSync('_projects').map((filename) => `/projects/${filename.replace('.md', '')}`),
fs.readdirSync('_work').map((filename) => `/work/${filename.replace('.md', '')}`)
].flat();
/** @type {import('@sveltejs/kit').Config} */
module.exports = {
preprocess: sveltePreprocess({
scss: {
includePaths: ['src/css', 'node_modules/foundation-sites/scss'],
prependData: `
@import 'settings.colors';
@import 'settings.global';
@import 'settings/settings';
@import 'prototype/prototype';
`
}
}),
kit: {
adapter: staticAdaptor(),
prerender: {
crawl: true,
pages
},
target: '#svelte',
vite: {
ssr: {
noExternal: Object.keys(pkg.dependencies || {})
}
}
}
};