-
Notifications
You must be signed in to change notification settings - Fork 17
/
vite.config.ts
39 lines (38 loc) · 1.03 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
31
32
33
34
35
36
37
38
39
import { reactRouter } from "@react-router/dev/vite"
import { reactRouterDevTools } from "react-router-devtools"
import { reactRouterHonoServer } from "react-router-hono-server/dev"
import { defineConfig } from "vite"
import babel from "vite-plugin-babel"
import { iconsSpritesheet } from "vite-plugin-icons-spritesheet"
import tsconfigPaths from "vite-tsconfig-paths"
export default defineConfig({
plugins: [
// Run the react-compiler on .tsx files
babel({
filter: /\.tsx?$/,
babelConfig: {
presets: ["@babel/preset-typescript"],
plugins: ["babel-plugin-react-compiler"],
},
}),
reactRouterDevTools(),
reactRouter(),
reactRouterHonoServer({
dev: {
exclude: [/^\/(resources)\/.+/],
},
}),
tsconfigPaths(),
iconsSpritesheet({
inputDir: "./resources/icons",
outputDir: "./app/library/icon/icons",
fileName: "icon.svg",
withTypes: true,
}),
],
server: {
open: true,
// biome-ignore lint/nursery/noProcessEnv: Its ok to use process.env here
port: Number(process.env.PORT || 4280),
},
})