nextload/next.config.mjs

28 lines
631 B
JavaScript
Raw Normal View History

import { withPayload } from '@payloadcms/next/withPayload'
2024-03-06 21:18:34 +00:00
/** @type {import('next').NextConfig} */
const nextConfig = {
2024-03-11 02:52:41 +00:00
// Your Next.js config here
experimental: {
2024-06-14 20:35:28 +00:00
reactCompiler: false,
},
output: 'standalone',
2024-06-18 06:28:50 +00:00
env: {
2024-06-18 06:30:03 +00:00
PORT: process.env.PORT,
HOSTNAME: process.env.HOSTNAME,
2024-06-18 06:28:50 +00:00
},
2024-06-25 20:19:08 +00:00
// Disable minification & chunking for debugging
webpack(config, { dev }) {
2024-06-25 20:44:15 +00:00
config.optimization.minimize = true
2024-06-25 20:19:08 +00:00
config.optimization.splitChunks = {
cacheGroups: {
2024-06-25 20:44:15 +00:00
default: true,
2024-06-25 20:19:08 +00:00
},
}
2024-06-25 20:44:15 +00:00
config.optimization.runtimeChunk = true
2024-06-25 20:19:08 +00:00
return config
},
}
2024-03-06 21:18:34 +00:00
export default withPayload(nextConfig)