zerobyte/vite.config.ts
copilot-swe-agent[bot] c03c8bee5f Add "Ironmount - " prefix to all route titles and version in sidebar
Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com>
2025-11-16 16:49:16 +01:00

32 lines
799 B
TypeScript

import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { reactRouterHonoServer } from "react-router-hono-server/dev";
import { execSync } from "node:child_process";
const getVersion = () => {
try {
return execSync("git describe --tags --always").toString().trim();
} catch {
return "dev";
}
};
export default defineConfig({
plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()],
define: {
"import.meta.env.VITE_APP_VERSION": JSON.stringify(getVersion()),
},
build: {
outDir: "dist",
sourcemap: true,
rollupOptions: {
external: ["bun"],
},
},
server: {
host: true,
port: 4096,
},
});