letsbe-hub/next.config.ts

37 lines
895 B
TypeScript

import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
output: 'standalone',
// reactCompiler: true, // Requires babel-plugin-react-compiler - enable later
experimental: {
serverActions: {
bodySizeLimit: '2mb',
},
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*.letsbe.solutions',
},
],
},
// Turbopack config (Next.js 16 default bundler)
turbopack: {},
// Handle native modules like ssh2 (for webpack fallback)
webpack: (config, { isServer }) => {
if (isServer) {
// Externalize ssh2 and its native dependencies
config.externals = config.externals || []
config.externals.push({
'ssh2': 'commonjs ssh2',
})
}
return config
},
// Externalize ssh2 for both Turbopack and Webpack
serverExternalPackages: ['ssh2'],
}
export default nextConfig