Files
study-bible-project/vite.config.js
T
nmemmertandClaude Sonnet 5.5 3ee1535c87 Real-browser tests (Playwright) and housekeeping
- npm run test:e2e builds the app, runs it on port 3101 with an empty throwaway
  database and drives Chrome (the installed one; no browser download) through
  notes and the paste check, the daily five minutes and weekly recall,
  translation compare (Bible text faked), and two-screen presenting.
- Vitest skips e2e/; ESLint knows the e2e folder and playwright.config.js.
- .gitignore: the local demo video, Playwright output and sign-in file.
- README and TODO describe the browser tests and what CI still needs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 14:00:15 -04:00

34 lines
899 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
host: true,
allowedHosts: ['study.necloud.us', 'localhost', 'study.versebyversewithnate.us'],
watch: {
ignored: ['**/.git/**'],
},
// Proxy /api calls to the Express backend during development
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
},
},
},
test: {
exclude: ['e2e/**', 'node_modules/**', 'dist/**'], // e2e/ holds the Playwright browser tests (npm run test:e2e)
environment: 'jsdom',
environmentOptions: {
jsdom: { url: 'http://localhost:3000/' },
},
globals: true,
setupFiles: './src/test-setup.js',
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
include: ['src/**/*.{js,jsx}'],
},
},
});