aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/vite.config.ts
blob: b827847963b84dab97b8f18937737fd55b1192d7 (plain)
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
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { execSync } from "child_process";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";

const commitHash = execSync("git rev-parse --short HEAD").toString().trim();

// https://vitejs.dev/config/
export default defineConfig({
  define: {
    __COMMIT_HASH__: JSON.stringify(commitHash),
  },
  plugins: [
    reactRouter(),
    tsconfigPaths(),
    tailwindcss()
  ],
  server: {
    proxy: {
      "^/api": {
        target: "https://localhost:7240",
        secure: false,
      },
    },
  },
});