This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsvelte.config.js
47 lines (43 loc) · 1.84 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
import node_adapter from "@sveltejs/adapter-node";
import static_adapter from "@sveltejs/adapter-static";
import auto from "@sveltejs/adapter-auto";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import path from "path";
const is_static = process.env.BUILD_STATIC_ENV ?? false;
const is_node = process.env.BUILD_NODE_ENV ?? false;
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess({}),
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: is_static
? static_adapter({
fallback: "app.html",
// precompress: true,
strict: true
})
: is_node
? node_adapter({
precompress: false
})
: auto(),
alias: {
$store: path.resolve("./src/lib/store"),
$hooks: path.resolve("./src/hooks"),
$components: path.resolve("./src/lib/components"),
$icons: path.resolve("./src/lib/icons"),
$data: path.resolve("./src/lib/data"),
$kaomoji: path.resolve("./src/lib/kaomoji"),
$error: path.resolve("./src/lib/components/errors"),
$functions: path.resolve("./src/lib/functions"),
$modals: path.resolve("./src/lib/components/modals"),
$skeletons: path.resolve("./src/lib/skeletons"),
$home: path.resolve("./")
}
}
};
export default config;