Files
Momento/memento-note/next.config.ts
Antigravity db200bbc9f
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 23s
fix: serverExternalPackages pour pptxgenjs, dagre, elkjs (Turbopack)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-05 21:41:07 +00:00

39 lines
1.2 KiB
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Enable standalone output for Docker
output: 'standalone',
// These server-side packages use Node.js internals (buffers, native modules, etc.)
// and must not be bundled by Turbopack — they are required directly by Node.js at runtime.
serverExternalPackages: ['pptxgenjs', 'dagre', 'elkjs'],
// Serve dynamically uploaded files via API route (public/ is read-only in production)
async rewrites() {
return [
{
source: '/uploads/:path*',
destination: '/api/uploads/:path*',
},
]
},
// Image optimization (enabled for better performance)
images: {
formats: ['image/avif', 'image/webp'],
},
// Hide the "compiling" indicator
devIndicators: false,
// Disable strict mode: React 19 strict mode can cause double-invocation of render
// functions during concurrent transitions, amplifying timing issues.
reactStrictMode: false,
// Allow development origins for HMR and Dev Server access
// @ts-ignore - Some NextConfig versions might require this in experimental
allowedDevOrigins: ['192.168.1.83'],
};
export default nextConfig;