chore: fix deployment eval error and add middleware safety checks

This commit is contained in:
2025-12-18 00:48:13 +01:00
parent 77814ea3cd
commit 728d53c121
9 changed files with 30 additions and 12 deletions

View File

@@ -1,8 +1,10 @@
/** @type {import('next').Config} */
const nextConfig = {
productionBrowserSourceMaps: false,
webpack: (config, { isServer }) => {
if (isServer) {
webpack: (config, { isServer, dev }) => {
// Disable source maps for the server build in production
// to prevent EvalError in strict environments (e.g. Coolify)
if (isServer && !dev) {
config.devtool = false;
}
return config;