From 5fd794fc5f902eea1942061d519dcd2f82f676a9 Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Tue, 1 Jul 2025 10:46:08 +0900 Subject: [PATCH] Configure `next.config.ts` for production and development: set `basePath`, `assetPrefix`, enable `standalone` output, and add environment logging. --- .../tax-lawfirm-demo-1/next.config.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lawfirm-demos/tax-lawfirm-demos/tax-lawfirm-demo-1/next.config.ts b/lawfirm-demos/tax-lawfirm-demos/tax-lawfirm-demo-1/next.config.ts index e9ffa30..a43f958 100644 --- a/lawfirm-demos/tax-lawfirm-demos/tax-lawfirm-demo-1/next.config.ts +++ b/lawfirm-demos/tax-lawfirm-demos/tax-lawfirm-demo-1/next.config.ts @@ -1,7 +1,17 @@ -import type { NextConfig } from "next"; +import type {NextConfig} from "next"; + +const isProd = process.env.NODE_ENV === 'production'; + +export const basePath = isProd ? '/lawfirm/demo3' : ''; +export const assetPrefix = isProd ? '/lawfirm/demo3' : ''; + +console.log(`🚀 [next.config.ts] Running in ${process.env.NODE_ENV} mode`); +console.log(`👉 basePath: ${basePath || '(none)'}`); const nextConfig: NextConfig = { - /* config options here */ + output: 'standalone', + basePath, + assetPrefix, }; export default nextConfig;