-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsvelte.config.js
53 lines (45 loc) · 1.28 KB
/
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
46
47
48
49
50
51
52
53
/** @type {import('@sveltejs/kit').Config} */
import resolve from '@rollup/plugin-node-resolve'
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import vercel from '@sveltejs/adapter-vercel';
const config = {
// options passed to svelte.compile (https://svelte.dev/docs#svelte_compile)
compilerOptions: null,
// an array of file extensions that should be treated as Svelte components
extensions: ['.svelte'],
kit: {
adapter: vercel(), // change this to whatever build adapter you want to use (e.g. static)
files: {
assets: 'static',
hooks: 'src/hooks',
lib: 'src/lib',
routes: 'src/routes',
serviceWorker: 'src/service-worker',
template: 'src/app.html'
},
paths: {
assets: '',
base: ''
},
// hydrate: false,
prerender: {
crawl: false,
enabled: false
},
router: true,
ssr: true,
vite: () => ({
plugins: [
builtins(),
resolve({
browser: true,
}),
globals(),
],
}),
},
// SvelteKit uses vite-plugin-svelte. Its options can be provided directly here.
// See the available options at https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md
};
export default config;