-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
39 lines (37 loc) · 942 Bytes
/
vite.config.ts
File metadata and controls
39 lines (37 loc) · 942 Bytes
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
import path from "node:path";
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { reactRouterDevTools } from "react-router-devtools";
import { defineConfig } from "vite";
import babel from "vite-plugin-babel";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig(({ command }) => ({
base: command === "build" ? "/.theme/" : "/",
plugins: [
babel({
filter: /\.[jt]sx?$/,
babelConfig: {
presets: ["@babel/preset-typescript"],
plugins: ["babel-plugin-react-compiler"],
},
}),
tailwindcss(),
reactRouterDevTools(),
reactRouter(),
tsconfigPaths(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
cors: true,
watch: {
ignored: ["**/.history/**"],
},
},
define: {
__RENDER_SSG__: JSON.stringify(command === "build"),
},
}));