nextload/next.config.mjs
tobias 116bdcecdb
Some checks failed
continuous-integration/drone/push Build is failing
Don't use variables in webpack config
2024-06-25 22:44:15 +02:00

28 lines
631 B
JavaScript

import { withPayload } from '@payloadcms/next/withPayload'
/** @type {import('next').NextConfig} */
const nextConfig = {
// Your Next.js config here
experimental: {
reactCompiler: false,
},
output: 'standalone',
env: {
PORT: process.env.PORT,
HOSTNAME: process.env.HOSTNAME,
},
// Disable minification & chunking for debugging
webpack(config, { dev }) {
config.optimization.minimize = true
config.optimization.splitChunks = {
cacheGroups: {
default: true,
},
}
config.optimization.runtimeChunk = true
return config
},
}
export default withPayload(nextConfig)