Files
study-bible-project/vite.config.js
nmemmertandClaude Sonnet 4.6 9b9de74084
Build and Push Docker Image / build-and-push (push) Successful in 3m2s
Fix Vite parsing git objects as JS modules on dev server
- Add server.watch.ignored for .git/** so chokidar doesn't pick up
  changes to git object files during git pull/fetch on the server
- Add .dockerignore to exclude .git, node_modules, and dist from
  the Docker build context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-09-02 09:20:26 -04:00

33 lines
782 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: {
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}'],
},
},
});