mirror of
https://github.com/ChiChou/entdb.git
synced 2026-06-10 15:03:55 +02:00
c7b22f9cf9
- Change root layout from min-h-screen to h-screen with overflow-hidden to properly constrain viewport height - Add min-h-0 to main element to allow flex shrinking - Add rewrite rule to proxy /data/* to production data URL for local dev - Make output: "export" conditional (production only) since rewrites require server mode
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
|
|
const isDev = process.env.NODE_ENV === "development";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: isDev ? undefined : "export",
|
|
basePath,
|
|
assetPrefix: basePath || undefined,
|
|
env: {
|
|
NEXT_PUBLIC_BUILD_TIME: new Date().toISOString(),
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/data/:path*",
|
|
destination: "https://codecolor.ist/entdb-data/:path*",
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|