canvas/packages/client/vite.config.js

27 lines
498 B
JavaScript
Raw Normal View History

2024-02-13 22:39:56 -08:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import * as child from "child_process";
const commitHash = child
.execSync("git rev-parse --short HEAD")
.toString()
.trim();
2024-02-13 22:39:56 -08:00
export default defineConfig({
root: "src",
envDir: "..",
build: {
2024-03-02 18:18:25 -08:00
outDir: "../dist",
2024-03-11 19:59:47 -07:00
emptyOutDir: true,
2024-07-12 11:36:42 -07:00
sourcemap: true,
2024-02-13 22:39:56 -08:00
},
plugins: [
react({
include: "**/*.{jsx,tsx}",
}),
],
define: {
__COMMIT_HASH__: JSON.stringify(commitHash),
},
2024-02-13 22:39:56 -08:00
});