forked from Tropix126/fluent-svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvelte.config.js
57 lines (52 loc) · 1.25 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
48
49
50
51
52
53
54
55
56
57
import path from "path";
import preprocess from "svelte-preprocess";
import vercel from "@sveltejs/adapter-vercel";
import cssnano from "cssnano";
import autoprefixer from "autoprefixer";
import prefixer from "postcss-variables-prefixer";
import a11yEmoji from "@fec/remark-a11y-emoji";
import slug from "rehype-slug";
import github from "remark-github";
import examples from "mdsvexamples";
import examplesVite from "mdsvexamples/vite";
import sveld from "vite-plugin-sveld";
import { mdsvex } from "mdsvex";
/** @type {import("@sveltejs/kit").Config} */
const config = {
extensions: [".svelte", ".md", ".svx"],
preprocess: [
mdsvex({
extensions: [".svx", ".md"],
remarkPlugins: [
github,
a11yEmoji,
[
examples,
{
ExampleComponent: "/src/site/lib/Example/Example.svelte"
}
]
],
rehypePlugins: [slug]
}),
preprocess({
postcss: {
plugins: [autoprefixer(), cssnano(), prefixer({ prefix: "fds-" })]
}
})
],
kit: {
adapter: vercel(),
vite: {
plugins: [sveld(), examplesVite],
resolve: {
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", "svg"],
alias: {
$site: path.resolve("src/site"),
"fluent-svelte": path.resolve("src/lib")
}
}
}
}
};
export default config;