forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: improve test stability and API routing
- Add proxy configuration for API requests in dev/test - Target default endorser API server in development - Add proxy for /api endpoints to handle CORS - Enhance contact management test reliability - Add comprehensive error handling and debugging - Extract test helper functions Breaking: None
This commit is contained in:
@@ -32,7 +32,13 @@ export default defineConfig(({ mode }) => {
|
||||
port: process.env.VITE_PORT || 8080,
|
||||
fs: {
|
||||
strict: false
|
||||
}
|
||||
},
|
||||
proxy: process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test' ? {
|
||||
'/api': {
|
||||
target: process.env.VITE_DEFAULT_ENDORSER_API_SERVER || 'http://localhost:3000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
} : undefined,
|
||||
},
|
||||
build: {
|
||||
outDir: isElectron ? "dist-electron" : "dist",
|
||||
|
||||
Reference in New Issue
Block a user