24 lines
740 B
TypeScript
24 lines
740 B
TypeScript
import path from "node:path"
|
|
import react from "@vitejs/plugin-react"
|
|
import { defineConfig } from "vitest/config"
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
// Declared explicitly (rather than via vite-tsconfig-paths) so alias
|
|
// resolution doesn't depend on tsconfig's include/exclude patterns,
|
|
// which also control what Next's production type-check compiles.
|
|
alias: {
|
|
"@lib": path.resolve(__dirname, "./src/lib"),
|
|
"@modules": path.resolve(__dirname, "./src/modules"),
|
|
"@pages": path.resolve(__dirname, "./src/pages"),
|
|
},
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./vitest.setup.ts"],
|
|
exclude: ["node_modules", ".next", "e2e"],
|
|
},
|
|
})
|