-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.ts
30 lines (29 loc) · 1.04 KB
/
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
import { reactRouter } from "@react-router/dev/vite";
import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(() => ({
server: {
port: 8788,
fs: {
// Restrict files that could be served by Vite's dev server. Accessing
// files outside this directory list that aren't imported from an allowed
// file will result in a 403. Both directories and files can be provided.
// If you're comfortable with Vite's dev server making any file within the
// project root available, you can remove this option. See more:
// https://vitejs.dev/config/server-options.html#server-fs-allow
allow: ["app", "node_modules/highlight.js"],
},
},
plugins: [
tailwindcss(),
cloudflareDevProxy({
getLoadContext({ context }) {
return { cloudflare: context.cloudflare };
},
}),
reactRouter(),
tsconfigPaths(),
],
}));