feat(prod): production deployment fixes - env loader, mongoose module, CSS static files, security hardening, PDF export, new UI components

This commit is contained in:
Rafif-Riqullah-Siregar committed 2026-07-16 13:14:34 +07:00
1 parent a403f752f3
commit 46f33eb088
69 files changed
+7367 -744

No files matched your search

+39 -2
View File
@@ -1,13 +1,50 @@
if (typeof globalThis.crypto === 'undefined') {
globalThis.crypto = require('crypto');
}
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
serverExternalPackages: ["mongoose"],
serverExternalPackages: ["mongoose", "better-sqlite3"],
experimental: {
serverActions: {
allowedOrigins: ["demoplace.my.id", "www.demoplace.my.id"],
allowedOrigins: [
"demoplace.my.id",
"www.demoplace.my.id",
"localhost:3000",
"127.0.0.1:3000",
],
},
},
// Enable Turbopack explicitly (Next.js 16 default) — empty config silences the webpack warning
turbopack: {},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "demoplace.my.id",
pathname: "/api/uploads/**",
},
{
protocol: "http",
hostname: "demoplace.my.id",
pathname: "/api/uploads/**",
},
{
protocol: "http",
hostname: "127.0.0.1",
port: "3001",
pathname: "/api/uploads/**",
},
{
protocol: "http",
hostname: "localhost",
port: "3001",
pathname: "/api/uploads/**",
},
],
},
async rewrites() {
return [
{