Jobber/orchestrator/vite.config.ts
Shaheer Sarfaraz 82e142a8a8
Auto-Registering Extractor System (#223)
* initial commit?

* Address PR feedback on extractor discovery and startup resilience

* Address latest PR review comments

* fix city resolution fallback when input parses empty

* address PR feedback on extractor registry and pipeline validation

* address copilot comments on manifests and registry startup

* fix extractor discovery export handling and env isolation in tests

* enforce duplicate manifest id failures in strict mode

* Fix remaining extractor registry and runtime review comments

* docs

* docs

* test all, logic remains in extractors

* Address PR review feedback on extractor registry and validation

* Revert extractor moduleResolution to bundler

* Enforce shared city filtering across all discovery sources

* Deduplicate extractor strict city post-filtering
2026-02-21 17:44:07 +00:00

69 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",
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),
},
});