16 lines
425 B
TypeScript
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;
|