Files
next-simple-template/next.config.ts
2026-01-05 14:11:43 +08:00

16 lines
425 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: isDev ? undefined : 'export',
distDir: 'dist',
basePath: basePath,
trailingSlash: true,
};
export default nextConfig;