chore: fix deployment eval error and add middleware safety checks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user