-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsvelte.config.js
More file actions
39 lines (33 loc) · 830 Bytes
/
svelte.config.js
File metadata and controls
39 lines (33 loc) · 830 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
39
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import * as child_process from "node:child_process";
import adapter from "@sveltejs/adapter-static";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
const path = fileURLToPath(new URL('package.json', import.meta.url));
const pkg = JSON.parse(readFileSync(path, 'utf8'));
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
adapter: adapter({
pages: "build",
assets: "build",
fallback: "index.html",
precompress: false,
strict: true
}),
files: {
lib: "src/shared",
routes: "src/pages"
},
alias: {
$pages: "src/pages",
$widgets: "src/widgets",
$shared: "src/shared"
},
version: {
name: pkg.version,
}
},
preprocess: vitePreprocess()
};
export default config;