Repository navigation
Expand file tree
/
Copy pathsvelte.config.js
More file actions
56 lines (52 loc) · 1.72 KB
/
Copy pathsvelte.config.js
File metadata and controls
56 lines (52 loc) · 1.72 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import adapter from '@sveltejs/adapter-node'; // To generate a standalone Node server
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({
out: 'build', // default: true | The directory to build the server to
precompress: false, // default: false | Enables precompressing using gzip & brotli for assets & prerendered pages
envPrefix: '' // default: '' | If you need to change the name of the environment variables used to configure the deployment
}),
csrf: {
checkOrigin: false // default: true | Protection against cross-site request forgery (CSRF) attacks.
},
files: {
// ... other file options
routes: 'src/routes' // Make sure routes are in a folder named 'routes'
},
alias: {
'@src': './src/*',
'@api': './src/routes/api/*',
'@components': './src/components/*',
'@collections': './src/collections/*',
'@utils': './src/utils/*',
'@stores': './src/stores/*',
'@static': 'static/',
'@root': './',
$paraglide: './src/paraglide'
}
},
// plugin options
vitePlugin: {
// remove inspector for production
inspector: {
// change shortcut
toggleKeyCombo: 'meta-shift',
// hold and release key to toggle inspector mode
holdMode: true,
// show or hide the inspector option
showToggleButton: 'always',
// inspector position
toggleButtonPos: 'bottom-right'
},
exclude: [],
// experimental options
experimental: {}
}
};
export default config;