Files
next-simple-template/next.config.ts
2026-01-05 13:51:05 +08:00

15 lines
382 B
TypeScript

import type { NextConfig } from "next";
import pkgs from "./package.json";
const isDev = process.env.NODE_ENV !== "production";
console.log(`NODE_ENV: ${process.env.NODE_ENV}`);
const basePath = isDev ? "" : `${pkgs.basename}`;
const nextConfig: NextConfig = {
/* config options here */
output: 'export',
distDir: 'dist',
basePath: basePath,
};
export default nextConfig;