Monitoring settings (Sentry, Umami) and the CSP origins come from the build environment

One build per environment: PROD_* variables for the production artifact,
TEST_* for the test build and the CSP check. The build fails when a variable
is empty. Tests use the production values from config/monitoringTestEnv.ts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 19:29:51 +01:00
co-authored by Claude Sonnet 5.5
parent 6475696709
commit 49b1d5f0ba
14 changed files with 286 additions and 85 deletions
+2
View File
@@ -1,3 +1,4 @@
import { monitoringTestEnv } from './config/monitoringTestEnv.ts';
import { configDefaults, defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
@@ -80,6 +81,7 @@ export default defineConfig(({ mode }) => ({
preview: { headers: securityHeaders('production') },
test: {
environment: 'jsdom',
env: monitoringTestEnv,
// De CI-runner (Raspberry Pi, arm64) is ±5-8x trager dan een pc; de
// eerste render met axe duurt daar tot 7 s. 5 s (standaard) is te krap.
testTimeout: 20_000,