-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsvelte.config.js
More file actions
38 lines (35 loc) · 1020 Bytes
/
svelte.config.js
File metadata and controls
38 lines (35 loc) · 1020 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
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
const path = fileURLToPath(new URL('package.json', import.meta.url));
const pkg = JSON.parse(readFileSync(path, 'utf8'));
/** @type {import('@sveltejs/kit').Config} */
const config = {
preprocess: vitePreprocess(),
kit: {
adapter: adapter({
// Where the final node build that uses the vite build goes.
// This is the code that gets deployed to prod.
out: 'dist',
}),
alias: {
'~': 'src',
'$types': 'src/lib/shared/types',
'$components': 'src/components',
'$models': 'src/lib/models',
'$client': 'src/lib/client',
'$server': 'src/lib/server',
'$shared': 'src/lib/shared',
},
files: {
hooks: {
server: 'src/lib/server/hooks.server.ts',
},
},
version: { name: pkg.version },
// Where the optimized vite build output goes.
outDir: 'build',
},
};
export default config;