20 lines
667 B
TypeScript
20 lines
667 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
import react from "@vitejs/plugin-react";
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
// Mirrors tsconfig's "@/*" -> "./src/*" path mapping (Next resolves this
|
|
// natively; Vite/Vitest need it spelled out) so ds/ modules that import
|
|
// via "@/..." (e.g. TabBar.tsx -> "@/i18n/common") resolve under Vitest too.
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
setupFiles: ["./vitest.setup.ts"],
|
|
globals: true,
|
|
server: { deps: { inline: [/@seed-design/] } },
|
|
},
|
|
});
|