|
|
|
@ -1,17 +1,19 @@
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import solidPlugin from "vite-plugin-solid";
|
|
|
|
import solidPlugin from "vite-plugin-solid";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const backendTarget = process.env.VITE_BACKEND_URL ?? "http://localhost:3000";
|
|
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
export default defineConfig({
|
|
|
|
plugins: [solidPlugin()],
|
|
|
|
plugins: [solidPlugin()],
|
|
|
|
server: {
|
|
|
|
server: {
|
|
|
|
port: 5173,
|
|
|
|
port: 5173,
|
|
|
|
proxy: {
|
|
|
|
proxy: {
|
|
|
|
"/api": {
|
|
|
|
"/api": {
|
|
|
|
target: "http://localhost:3000",
|
|
|
|
target: backendTarget,
|
|
|
|
changeOrigin: true,
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"/health": {
|
|
|
|
"/health": {
|
|
|
|
target: "http://localhost:3000",
|
|
|
|
target: backendTarget,
|
|
|
|
changeOrigin: true,
|
|
|
|
changeOrigin: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|