import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' import path from 'node:path' // https://vite.dev/config/ export default defineConfig({ plugins: [ react(), tailwindcss(), ], // Shared files (../shared/*.ts) live outside web/ so Vite resolves their imports // from the repo root where @bytelyst/* are not installed. Redirect all @bytelyst/* // imports to web/node_modules where pnpm installs them. resolve: { alias: [ { find: /^@bytelyst\/(.+)/, replacement: path.resolve(__dirname, 'node_modules/@bytelyst/$1'), }, ], }, test: { environment: 'jsdom', setupFiles: ['./src/test/setup.ts'], include: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/**/*.dom.test.tsx'], }, })