Skyvern/skyvern-frontend/vite.config.ts
Celal Zamanoğlu 56275c862c
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Failing after 6s
Publish Fern Docs / run (push) Failing after 4m16s
Run tests and pre-commit / Frontend Lint and Build (push) Successful in 5m47s
fix: prevent settings page crash for self-hosted Docker builds (#5163)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 22:39:36 +00:00

32 lines
663 B
TypeScript

import { execSync } from "child_process";
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
port: 8080,
},
preview: {
port: 8080,
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
define: {
__APP_VERSION__: JSON.stringify(
process.env.APP_VERSION ||
(() => {
try {
return execSync("git rev-parse HEAD").toString().trim();
} catch {
return "development";
}
})(),
),
},
});