fix(docker): ship a runtime-safe Next config.

Replace the TypeScript Next config with an mjs file so the production container can start without trying to install TypeScript at runtime.

Made-with: Cursor
This commit is contained in:
iamlukethedev
2026-04-07 23:54:51 -05:00
committed by iamlukethedev
parent f28bc2b42f
commit 4ba6b40b24
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ COPY --from=builder /app/public ./public
COPY --from=builder /app/server ./server
COPY --from=deps /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/next.config.ts ./next.config.ts
COPY --from=builder /app/next.config.mjs ./next.config.mjs
EXPOSE 3000
+2 -3
View File
@@ -1,5 +1,3 @@
import type { NextConfig } from "next";
const securityHeaders = [
{
key: "Content-Security-Policy",
@@ -48,7 +46,8 @@ if (process.env.NODE_ENV === "production") {
});
}
const nextConfig: NextConfig = {
/** @type {import('next').NextConfig} */
const nextConfig = {
async headers() {
return [
{