-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.js
44 lines (40 loc) · 971 Bytes
/
vite.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 { svelte } from "@sveltejs/vite-plugin-svelte";
import routify from "@roxi/routify/vite-plugin";
import { defineConfig } from "vite";
import { mdsvex } from "mdsvex";
import postcss from "postcss";
import mdsvexConfig from "./mdsvex.config";
const production = process.env.NODE_ENV === "production";
export default defineConfig({
clearScreen: false,
plugins: [
routify({
render: {
ssg: true,
},
}),
svelte({
compilerOptions: {
dev: !production,
hydratable: !!process.env.ROUTIFY_SSR_ENABLE,
},
extensions: [".md", ".svelte", ".svx"],
preprocess: [mdsvex(mdsvexConfig)],
}),
],
css: { postcss },
server: {
port: 5000,
host: true,
},
resolve: {
alias: {
$lib: "/src/lib",
$assets: "/src/lib/assets",
$data: "/src/lib/data",
$layout: "/src/lib/layout",
$store: "/src/lib/store",
$helpers: "/src/lib/helpers",
},
},
});