22 lines
598 B
TypeScript
22 lines
598 B
TypeScript
import path from "node:path";
|
|
import { defineConfig } from "vitest/config";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
test: {
|
|
// Node 18+ exposes `Response` / `fetch` globals, so we don't need jsdom.
|
|
// VITE_API_BASE_URL must be set so the api module treats itself as
|
|
// configured; otherwise every GET would throw notConfiguredError before
|
|
// reaching the mocked fetch.
|
|
env: {
|
|
VITE_API_BASE_URL: "http://test.local",
|
|
},
|
|
},
|
|
});
|