import react from "@vitejs/plugin-react"; import { defineConfig } from "vitest/config"; export default defineConfig(({ mode }) => ({ define: { "process.env.NODE_ENV": JSON.stringify(mode === "test" ? "test" : "production"), }, plugins: [react()], build: { outDir: "../showcase/static/showcase/dist", emptyOutDir: true, lib: { entry: "src/main.tsx", formats: ["es"], fileName: () => "map.js", }, rollupOptions: { output: { assetFileNames: "map.[ext]", }, }, }, test: { environment: "jsdom", globals: true, }, }));