Files
doormile_react/next.config.ts
Aravind ce602a454f Revert to standalone output: static export cannot run the SMTP Server Action
output: "export" produces pure static HTML with no server at runtime, so
the contact form's Server Action (src/actions/sendEmail.ts, nodemailer/SMTP)
can never execute under it - Next.js itself refuses to build with a Server
Action present under output: "export". The deploy architecture is being
switched to a Node standalone runtime (see doormile-build) instead, which
supports the existing Server Action unchanged.
2026-07-13 20:18:59 +05:30

32 lines
976 B
TypeScript

import type { NextConfig } from "next";
import path from "path";
const nextConfig: NextConfig = {
async redirects() {
return [
{
source: "/air-freight",
destination: "/doormile-wings",
permanent: true,
},
];
},
turbopack: {
root: path.resolve(__dirname),
},
output: "standalone",
// Required by the How It Works 3D experience. React StrictMode double-invokes
// mount/effects in dev, which tears down and re-creates the WebGL context of
// the heavy 32MB scene mid-initialization — the context is lost ("THREE.
// WebGLRenderer: Context Lost") and the canvas stays blank. This is a known
// React-Three-Fiber + StrictMode incompatibility. Disabling it is a DEV-ONLY
// change (production never runs StrictMode's double-mount) and does not affect
// any other page's runtime behavior.
reactStrictMode: false,
images: {
formats: ["image/avif", "image/webp"],
},
};
export default nextConfig;