line-and-surface/vite.config.ts

14 lines
364 B
TypeScript

import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import cp from "child_process";
const commitHash = cp.execSync("git rev-parse --short HEAD").toString();
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
base: "",
define: {
__COMMIT_HASH__: JSON.stringify(commitHash),
},
});