in vite.config.ts [20:59]
export default defineConfig({
// Project root directory (where index.html is located)
root: "./",
// Base public path for build output (optional, defaults to '/')
base: "/",
// Build options
build: {
// Output directory for production build
outDir: "./dist",
},
// Resolve options
resolve: {
alias: {
// Example alias for easier imports
"@/": `${__dirname}/src/`,
},
},
// Test-specific options
test: {
// Test environment (e.g., 'jsdom', 'node', 'happy-dom')
environment: "node",
// Include files for testing (glob patterns)
include: ["src/**/*.test.{ts,tsx}"],
// Exclude files from testing (glob patterns)
exclude: ["node_modules"],
// Enable coverage report generation
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: ["src/generated/", "bindings/", "integration/"],
},
},
});