Files
triqura-ecd/next.config.mjs
colinislit 75c7e284b9 feat(verpleegrapportage): Nieuwe module + opruiming codebase
Verpleegrapportage module:
- Nieuwe /epd/verpleegrapportage met patiëntenoverzicht
- Rapportage invoer workspace met timeline view
- Overdracht overzicht met AI-samenvatting
- API endpoints voor verpleegrapportage data

Opruiming:
- Oude /epd/overdracht en /epd/dagregistratie verwijderd (vervangen)
- Oude /api/nursing-logs verwijderd (geconsolideerd naar reports)
- Verouderde design docs en reports verwijderd
- Fonts verplaatst van docs/ naar public/fonts/

Bugfixes:
- Risk-manager: fix constraint violation (db values vs display labels)
- Overdracht API: filter op rapportages i.p.v. encounters

Database:
- Migratie voor consolidatie nursing_logs naar reports tabel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 11:19:48 +01:00

84 lines
2.3 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Performance optimizations
compress: true, // Enable gzip compression
// Redirects for renamed routes
async redirects() {
return [
// Overdracht → Verpleegrapportage
{
source: '/epd/overdracht',
destination: '/epd/verpleegrapportage',
permanent: true,
},
{
source: '/epd/overdracht/:patientId',
destination: '/epd/verpleegrapportage?patient=:patientId',
permanent: true,
},
// Dagregistratie → Zorgnotities
{
source: '/epd/dagregistratie',
destination: '/epd/verpleegrapportage/zorgnotities',
permanent: true,
},
{
source: '/epd/dagregistratie/:patientId',
destination: '/epd/verpleegrapportage/zorgnotities/:patientId',
permanent: true,
},
];
},
// Optimize images (if any are added later)
images: {
formats: ['image/avif', 'image/webp'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
remotePatterns: [
{
protocol: 'https',
hostname: 'images.unsplash.com'
}
]
},
// Experimental features for better performance
experimental: {
optimizePackageImports: ['lucide-react', '@react-three/fiber', '@react-three/drei'],
},
// Webpack optimizations - only in production
webpack: (config, { isServer, dev }) => {
// Only apply optimizations in production build
if (!isServer && !dev) {
config.optimization = {
...config.optimization,
splitChunks: {
chunks: 'async',
cacheGroups: {
// Keep default Next.js optimizations
...config.optimization?.splitChunks?.cacheGroups,
// Add specific chunk for three.js (heavy library)
three: {
name: 'three',
test: /[\\/]node_modules[\\/](three|@react-three)[\\/]/,
priority: 30,
reuseExistingChunk: true,
},
},
},
};
}
// Avoid serializing very large strings into webpack's filesystem cache during production builds
if (!dev) {
config.cache = { type: 'memory' };
}
return config;
},
};
export default nextConfig;