Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

vite.config.ts

38 lines1.0 KB

1import { cloudflare } from "@cloudflare/vite-plugin";
2import mdx from "@mdx-js/rollup";
3import tailwindcss from "@tailwindcss/vite";
4import { devtools } from "@tanstack/devtools-vite";
5import { tanstackStart } from "@tanstack/react-start/plugin/vite";
6import viteReact from "@vitejs/plugin-react";
7import rehypePrism from "rehype-prism-plus";
8import { defineConfig } from "vite";
9import viteTsConfigPaths from "vite-tsconfig-paths";
10​
11const config = defineConfig({
12 // server: {
13 // host: true,
14 // hmr: {
15 // host: "localhost", // or leave undefined for all
16 // },
17 // allowedHosts: [".localhost"],
18 // },
19 plugins: [
20 devtools(),
21 cloudflare({ viteEnvironment: { name: "ssr" } }),
22 // this is the plugin that enables path aliases
23 viteTsConfigPaths({
24 projects: ["./tsconfig.json"],
25 }),
26 tailwindcss(),
27 tanstackStart(),
28 viteReact(),
29 mdx({
30 rehypePlugins: [rehypePrism],
31 }),
32 ],
33 optimizeDeps: {
34 exclude: ["@electric-sql/pglite"],
35 },
36});
37​
38export default config;