Upgrades
- Frontend: React 19.2, Vite 8.2, @vitejs/plugin-react 6.1, ESLint 9.39
- Backend: Express 5.2, Helmet 8.3, express-rate-limit 8.7, pino 10.3,
pino-http 11, pg 8.23, dotenv 17.4, bcryptjs 3.0, ESLint 10.9
- Lockfiles opnieuw gegenereerd (backend had er geen)
Breaking changes opgevangen
- Express 5 laat kale wildcards in routes niet toe: app.use("/api/*") is een
prefix-mount geworden en app.get("*") pad-loze middleware
- Vite 8 bundelt met Rolldown, dat de object-vorm van manualChunks niet kent;
omgezet naar build.rollupOptions.output.advancedChunks
- Rate-limit headers verschillen per RFC-draft; de test kijkt nu naar de hele
RateLimit-headerfamilie in plaats van naar RateLimit-Limit
- ESLint blijft in de frontend op 9: eslint-plugin-react ondersteunt nog geen
ESLint 10 (peer <= ^9.7)
Update-check bij het testen
- docker/check-updates.mjs vergelijkt beide package.json's met het
npm-register; werkt zonder node_modules en zonder npm install
- test.ps1 draait dit als stap 1 van 4, met -Strict (falen) en -SkipDeps
(offline). Ook informatief in de Test-stage van de pipeline
- Bewuste uitzonderingen met reden in docker/update-exceptions.json
- dev.ps1 up gebruikt --renew-anon-volumes, anders houdt de dev-container de
oude node_modules na een upgrade
Overig
- ESLint flat configs voor beide packages; npm run lint werkte niet omdat er
geen configuratie was. Beide draaien nu groen (alleen waarschuwingen over
bestaande ongebruikte variabelen)
- README.md, BEHEER.md en Changelog.md bijgewerkt
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { readFileSync } from "fs";
|
|
import { fileURLToPath } from "url";
|
|
import { dirname, join } from "path";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const pkg = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf-8"));
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
// In dev: proxy /api naar de API in dezelfde container (zie docker/dev-entrypoint.sh)
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:3001",
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: false, // zet op true voor staged deploys
|
|
chunkSizeWarningLimit: 800,
|
|
rollupOptions: {
|
|
output: {
|
|
// Splits vendor chunks voor betere caching. Vite 8 bundelt met
|
|
// Rolldown; die kent de object-vorm van manualChunks niet, dus dit
|
|
// gaat via advancedChunks.
|
|
advancedChunks: {
|
|
groups: [
|
|
// RegExp via constructor: module-ids zijn genormaliseerd met "/"
|
|
{ name: "react", test: new RegExp("node_modules/(react|react-dom|scheduler)/") },
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
define: {
|
|
// VITE_API_URL wordt ingebakken tijdens build
|
|
__API_URL__: JSON.stringify(process.env.VITE_API_URL ?? "/api"),
|
|
__APP_VERSION__: JSON.stringify(process.env.VITE_APP_VERSION ?? pkg.version),
|
|
},
|
|
});
|