File size: 741 Bytes
b7d4394
 
4a940a5
b7d4394
 
 
4a940a5
 
 
 
 
 
 
b7d4394
 
50ae780
b7d4394
 
 
 
 
 
 
 
06a5304
b7d4394
 
 
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
import { defineConfig } from "vite";
import preact from "@preact/preset-vite";
import path from "path";

export default defineConfig({
  plugins: [preact()],
  resolve: {
    alias: {
      // Allow shared/ files outside web/ to resolve preact from web/node_modules
      "preact": path.resolve(__dirname, "node_modules/preact"),
      "preact/hooks": path.resolve(__dirname, "node_modules/preact/hooks"),
    },
  },
  build: {
    outDir: "../public",
    emptyOutDir: true,
  },
  server: {
    port: 5173,
    proxy: {
      "/v1": "http://localhost:8080",
      "/auth": "http://localhost:8080",
      "/health": "http://localhost:8080",
      "/debug": "http://localhost:8080",
      "/admin": "http://localhost:8080",
    },
  },
});