import { readFileSync } from "fs"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; const pkg = JSON.parse( readFileSync(new URL("./package.json", import.meta.url), "utf-8"), ); export default defineConfig({ plugins: [react()], server: { port: 3000, }, define: { __APP_VERSION__: JSON.stringify(pkg.version), }, test: { environment: "jsdom", setupFiles: "./src/setupTests.js", }, });