forked from Rich-Harris/svelte-cubed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
45 lines (38 loc) · 834 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
45
import path from 'path';
import adapter from '@sveltejs/adapter-static';
import { preprocess } from './utils/preprocess.js';
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.svelte.md'],
preprocess,
kit: {
adapter: adapter(),
target: '#svelte',
package: {
files: (id) => !id.startsWith('site/')
},
vite: {
resolve: {
alias: {
'svelte-cubed': path.resolve('src/lib')
}
},
optimizeDeps: {
include: ['svelte-knobby', '@sveltejs/site-kit'],
exclude: ['three']
},
ssr: {
noExternal: ['three', 'svelte-knobby', '@sveltejs/site-kit']
},
server: {
fs: {
allow: [
// TODO temporary, so that we can link this package
path.resolve('../../sites/packages/site-kit')
]
}
}
}
}
};
export default config;