-
Notifications
You must be signed in to change notification settings - Fork 0
/
svelte.config.js
44 lines (42 loc) · 1.01 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
import sveltePreprocess from "svelte-preprocess";
import { mdsvex } from "mdsvex";
import adapter from "@sveltejs/adapter-static";
import path from "path";
const aliasList = [
{ name: "@lib", path: "./src/lib" },
{ name: "@core", path: "./src/core" },
{ name: "@components", path: "./src/lib/components" },
{ name: "@views", path: "./src/lib/views" },
{ name: "@styles", path: "./src/styles" },
{ name: "@types", path: "./src/types" },
{ name: "@util", path: "./src/lib/util" }
];
/** @type {import('@sveltejs/kit').Config} */
export default {
preprocess: [
sveltePreprocess({
defaults: {
script: "ts"
}
}),
mdsvex({
extensions: [ ".svelte", ".svx", ".md" ]
})
],
extensions: [ ".svelte", ".svx", ".md" ],
kit: {
appDir: "app",
adapter: adapter(),
paths: {
base: process.env.NODE_ENV === "production" ? "/blossom-web" : "",
},
target: "body",
vite: {
resolve: {
alias: Object.fromEntries(aliasList.map(alias => (
[ alias.name, path.resolve(alias.path) ]
)))
},
},
}
};