shoc-frontend-new/vite.config.ts
Alexandre Brandizzi c68d47af7b
Some checks failed
CI / ci (push) Has been cancelled
Deploy / deploy (push) Has been cancelled
chore: upgrade frontend dependencies (#24)
* chore: upgrade frontend application dependencies

* chore: upgrade frontend infrastructure dependencies

* fix: align lockfiles with CI npm

* fix: preserve ky error semantics

* fix: sanitize timeout error message
2026-07-14 21:35:59 -03:00

33 lines
797 B
TypeScript

import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "node:path";
import { defineConfig, loadEnv } from "vite";
import { assertAbsoluteApiUrlHasApiSegment } from "./config/api-url-contract";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
assertAbsoluteApiUrlHasApiSegment(env.VITE_API_URL);
return {
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
server: {
port: 3000,
proxy: {
"/api": {
target: env.VITE_API_TARGET ?? "http://localhost:5141",
changeOrigin: true,
secure: false,
},
},
},
build: {
outDir: "dist",
},
};
});