Files
evig/next.config.js
T
g-butandClaude Opus 4.5 170dd1c11b feat(admin): reorganize sidebar into groups and transform Hirn to AI assistant
- Reorganize sidebar from flat 14+ items into 6 logical groups:
  Übersicht, Angebot, Inhalte, Analyse, Personen, System
- Move analytics pages from /admin/hirn/* to /admin/analyse/*
- Transform /admin/hirn from BI dashboard to pure AI chat interface
- Add floating button + slide-over panel for quick Hirn AI access
- Add HirnChat compact mode for slide-over panel
- Add redirects for old /admin/hirn/* paths
- Add permission alias for backwards compatibility (finances -> finanzen)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:49:40 +01:00

128 lines
3.0 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
unoptimized: false,
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '9000',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'medusa-public-images.s3.eu-west-1.amazonaws.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: '*.amazonaws.com',
pathname: '/**',
},
],
},
async redirects() {
return [
// Redirect old Hirn paths to new Analyse paths
{
source: '/admin/hirn/finanzen',
destination: '/admin/analyse/finanzen',
permanent: true,
},
{
source: '/admin/hirn/kennzahlen',
destination: '/admin/analyse/kennzahlen',
permanent: true,
},
{
source: '/admin/hirn/wirkung',
destination: '/admin/analyse/wirkung',
permanent: true,
},
{
source: '/admin/hirn/transparenz',
destination: '/admin/analyse/transparenz',
permanent: true,
},
// Redirect old AI page to main Hirn page
{
source: '/admin/hirn/ai',
destination: '/admin/hirn',
permanent: true,
},
];
},
async rewrites() {
return [
{
source: '/api/medusa/:path*',
destination: `${process.env.MEDUSA_API_URL || 'http://localhost:9000'}/:path*`,
},
];
},
webpack: (config, { isServer, dev }) => {
// Font loader configuration
config.module.rules.push({
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: {
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'static/fonts/',
},
},
});
// Handle fs module for client-side
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
};
}
// Reduce file watching load in dev to avoid EMFILE errors
if (dev) {
config.watchOptions = {
...(config.watchOptions || {}),
// Large/irrelevant directories to ignore in watch
ignored: [
'**/.git/**',
'**/.next/**',
'**/node_modules/**',
'**/.swc/**',
'**/logs/**',
'**/playwright-report/**',
'**/test-results/**',
'**/postgres-init/**',
'**/cms-api/**',
'**/medusa-backend/**',
'**/examples/**',
'**/packages/**',
],
followSymlinks: false,
};
}
return config;
},
// Enable static optimization
output: 'standalone',
// Ensure proper CSS handling
experimental: {
optimizeCss: true,
},
// Turbopack configuration (moved from experimental.turbo in Next.js 16)
turbopack: {
resolveAlias: {
// Ensure CSS modules are handled correctly
styles: './src/styles',
},
},
// Add specific CSS handling
sassOptions: {
includePaths: ['./src/styles'],
},
}
module.exports = nextConfig