Refactor basePath and assetPrefix in next.config.ts for improved readability

This commit is contained in:
2025-06-08 21:57:46 +02:00
parent ed1e1bb65c
commit e61b88c9d9

View File

@@ -2,13 +2,16 @@ import type {NextConfig} from "next";
const isProd = process.env.NODE_ENV === 'production';
const basePath = isProd ? '/lawfirm/demo1' : '';
const assetPrefix = isProd ? '/lawfirm/demo1' : '';
console.log(`🚀 [next.config.ts] Running in ${process.env.NODE_ENV} mode`);
console.log(`👉 basePath: ${isProd ? '/lawfirm/demo1' : '(none)'}`);
console.log(`👉 basePath: ${basePath || '(none)'}`);
const nextConfig: NextConfig = {
output: 'standalone',
basePath: isProd ? '/lawfirm/demo1' : '',
assetPrefix: isProd ? '/lawfirm/demo1' : '',
basePath,
assetPrefix,
};
export default nextConfig;