Jobber/orchestrator/vite.config.ts
Shaheer Sarfaraz 8c952a4011
Registry Architecture for Visa Sponsor sources (#246)
* initial

* lint fix

* docs!

* fix CI

* ci and runner fix

* fix + docs!

* make CI pass

* country specific search

* remove country specific language

* fix UI

* address comments

* Address visa sponsor PR feedback

* Address remaining visa sponsor review feedback

* Harden visa sponsor provider validation
2026-03-10 02:02:30 +00:00

72 lines
1.6 KiB
TypeScript

/// <reference types="vitest" />
import { execSync } from "node:child_process";
import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
let gitVersion: string;
try {
gitVersion = execSync("git describe --tags --always", {
stdio: ["ignore", "pipe", "ignore"],
})
.toString()
.trim();
} catch {
gitVersion = process.env.APP_VERSION ?? "unknown";
}
declare global {
// eslint-disable-next-line no-var
var __APP_VERSION__: string;
}
export default defineConfig({
plugins: [react(), tailwindcss()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/setupTests.ts",
maxWorkers: 1,
testTimeout: 30_000,
hookTimeout: 30_000,
include: [
"src/**/*.test.ts",
"src/**/*.test.tsx",
"../shared/src/**/*.test.ts",
"../extractors/**/tests/**/*.test.ts",
],
exclude: ["node_modules/**", "dist/**"],
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@client": path.resolve(__dirname, "./src/client"),
"@server": path.resolve(__dirname, "./src/server"),
"@infra": path.resolve(__dirname, "./src/server/infra"),
"@shared": path.resolve(__dirname, "../shared/src"),
},
},
server: {
port: 5173,
proxy: {
"/api": {
target: "http://localhost:3001",
changeOrigin: true,
},
"/pdfs": {
target: "http://localhost:3001",
changeOrigin: true,
},
},
},
build: {
outDir: "dist/client",
emptyOutDir: true,
},
define: {
__APP_VERSION__: JSON.stringify(gitVersion),
},
});