import type { NextConfig } from "next";

const routePre = process.env.NEXT_PUBLIC_ROUTE_PRE || '';
const basePath = routePre ? `/${routePre}` : '';

const nextConfig: NextConfig = {
  output: "export",
  distDir: routePre || "out",
  trailingSlash: true,
  basePath: basePath,
  assetPrefix: basePath,
  images: {
    unoptimized: true,
  },
};

export default nextConfig;
