forked from Dsek-LTH/web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
27 lines (22 loc) · 847 Bytes
/
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
import vercelAdapter from "@sveltejs/adapter-vercel";
import nodeAdapter from "@sveltejs/adapter-node";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import { execSync } from "child_process";
const adapter = process.env.VERCEL_ENV ? vercelAdapter : nodeAdapter;
/** @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(),
alias: {
$paraglide: "./src/translations/paraglide", // same as outdir for paraglide in vite.config.ts
},
version: {
name: execSync("git describe --tags").toString().trim(),
},
},
};
export default config;