2025-12-06 12:46:40 +09:00
|
|
|
import type { NextConfig } from "next"
|
2025-12-21 00:55:54 +09:00
|
|
|
import packageJson from "./package.json"
|
2025-03-19 06:04:06 +00:00
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
2025-12-06 12:46:40 +09:00
|
|
|
/* config options here */
|
|
|
|
|
output: "standalone",
|
2025-12-22 19:58:55 +05:30
|
|
|
// Support for subdirectory deployment (e.g., https://example.com/nextaidrawio)
|
|
|
|
|
// Set NEXT_PUBLIC_BASE_PATH environment variable to your subdirectory path (e.g., /nextaidrawio)
|
|
|
|
|
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "",
|
2025-12-21 00:55:54 +09:00
|
|
|
env: {
|
|
|
|
|
APP_VERSION: packageJson.version,
|
|
|
|
|
},
|
2026-10-05 22:39:32 +09:00
|
|
|
// Include instrumentation.ts in standalone build for Langfuse telemetry,
|
|
|
|
|
// and the shape library docs get_shape_library reads at run time
|
2025-12-23 01:03:11 +09:00
|
|
|
outputFileTracingIncludes: {
|
|
|
|
|
"*": ["./instrumentation.ts"],
|
2026-10-05 22:39:32 +09:00
|
|
|
"/api/chat": ["./docs/shape-libraries/*.md"],
|
2025-12-23 01:03:11 +09:00
|
|
|
},
|
2026-10-12 08:16:49 +09:00
|
|
|
// The Chinese and Japanese About pages used to be separate routes
|
|
|
|
|
async redirects() {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
source: "/:lang/about/cn",
|
|
|
|
|
destination: "/zh/about",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
source: "/:lang/about/ja",
|
|
|
|
|
destination: "/ja/about",
|
|
|
|
|
permanent: true,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
2025-12-06 12:46:40 +09:00
|
|
|
}
|
2025-03-19 06:04:06 +00:00
|
|
|
|
2025-12-06 12:46:40 +09:00
|
|
|
export default nextConfig
|