9router/gitbook/next.config.mjs
2026-05-11 11:50:24 +07:00

24 lines
516 B
JavaScript

import { fileURLToPath } from "node:url";
import { dirname } from "node:path";
/** @type {import('next').NextConfig} */
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? "";
const projectRoot = dirname(fileURLToPath(import.meta.url));
const nextConfig = {
output: "export",
basePath,
assetPrefix: basePath || undefined,
trailingSlash: true,
images: {
unoptimized: true
},
turbopack: {
root: projectRoot
},
env: {
NEXT_PUBLIC_BASE_PATH: basePath
}
};
export default nextConfig;