-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.ts
37 lines (35 loc) · 1.01 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
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { remixDevTools } from "remix-development-tools/vite";
import { routes } from "./remix/config";
import { vercelPreset } from "@vercel/remix/vite";
import { iconsSpritesheet } from "vite-plugin-icons-spritesheet";
import { devServer } from "react-router-hono-server/dev";
export default defineConfig({
plugins: [
remixDevTools(),
remix({ routes, presets: [vercelPreset()] }),
tsconfigPaths(),
devServer({
exclude: [/^\/(resources)\/.+/],
}),
iconsSpritesheet({
inputDir: "./resources/icons",
outputDir: "./app/library/icon/icons",
withTypes: true,
fileName: "icon.svg",
}),
],
build: {
target: "esnext",
},
define: {
POSTHOG_API_KEY: JSON.stringify(process.env.POSTHOG_API_KEY),
POSTHOG_API_ENDPOINT: JSON.stringify(process.env.POSTHOG_API_ENDPOINT),
},
server: {
open: true,
port: 3000,
},
});