-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
37 lines (36 loc) · 981 Bytes
/
vite.config.ts
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
import mdx from "@mdx-js/rollup";
import {
vitePlugin as remix,
cloudflareDevProxyVitePlugin as remixCloudflareDevProxy,
} from "@remix-run/dev";
import rehypeHighlight from "rehype-highlight";
import remarkFrontmatter from "remark-frontmatter";
import remarkGfm from "remark-gfm";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(() => {
const HOST = process.env.HOST === "true" ? true : false;
const PORT = process.env.PORT ? Number(process.env.PORT) : 3000;
return {
plugins: [
mdx({
remarkPlugins: [
remarkFrontmatter,
remarkMdxFrontmatter,
remarkGfm,
rehypeHighlight,
],
}),
remixCloudflareDevProxy(),
remix({
ignoredRouteFiles: ["**/*.css"],
}),
tsconfigPaths(),
],
server: {
port: PORT,
host: HOST,
},
};
});