Repository navigation
Expand file tree
/
Copy pathvite.config.ts
More file actions
47 lines (45 loc) · 1.43 KB
/
Copy pathvite.config.ts
File metadata and controls
47 lines (45 loc) · 1.43 KB
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 { mdsvex } from "mdsvex"
import { mdsvexSvelte5Preprocess } from "./mdsvex-svelte5-preprocess"
import rehypeKatex from "rehype-katex"
import remarkMath from "remark-math"
import tailwindcss from "@tailwindcss/vite"
import adapter from "@sveltejs/adapter-auto"
import { enhancedImages } from "@sveltejs/enhanced-img"
import { sveltekit } from "@sveltejs/kit/vite"
import { defineConfig } from "vite"
export default defineConfig({
ssr: {
noExternal: ["@skeletonlabs/skeleton-svelte"]
},
plugins: [
enhancedImages(),
tailwindcss(),
sveltekit({
alias: {
$components: "src/components",
$content: "src/content"
},
compilerOptions: {
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
runes: ({ filename }: { filename: string }) =>
filename.split(/[/\\]/).includes("node_modules") ? undefined : true
},
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
preprocess: [
mdsvex({
extensions: [".svx", ".md"],
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex]
}),
mdsvexSvelte5Preprocess()
],
extensions: [".svelte", ".svx", ".md"]
})
],
server: {
port: 3000
}
})