-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
49 lines (43 loc) · 1.33 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
// import auto from '@sveltejs/adapter-auto';
import vercel from '@sveltejs/adapter-vercel';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import path, { dirname } from 'path';
import { fileURLToPath } from 'url';
import mdsvexConfig from './mdsvex.config.js';
const $filepath = dirname(fileURLToPath(import.meta.url)).replace(/\\/g, '/');
const $src = path.resolve($filepath, './src');
const $lib = path.resolve($src, './lib');
const $routes = path.resolve($src, './routes');
/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte'],
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
mdsvex(mdsvexConfig),
vitePreprocess({
style: {
postcss: true
}
})
],
kit: {
adapter: vercel({ runtime: 'nodejs20.x' }),
alias: {
$routes,
$actions: path.resolve($lib, './actions'),
$buttons: path.resolve($lib, './buttons'),
$functions: path.resolve($lib, './functions'),
$inputs: path.resolve($lib, './inputs'),
$navigation: path.resolve($lib, './navigation'),
$toasts: path.resolve($lib, './toasts'),
$tooltip: path.resolve($lib, './tooltip'),
$wrappers: path.resolve($lib, './wrappers')
}
}
// vitePlugin: {
// inspector: true
// }
};
export default config;