mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
Add outputFileTracingIncludes to next.config.ts to ensure instrumentation.ts is included in standalone builds (required for App Runner deployment)
20 lines
656 B
TypeScript
20 lines
656 B
TypeScript
import type { NextConfig } from "next"
|
|
import packageJson from "./package.json"
|
|
|
|
const nextConfig: NextConfig = {
|
|
/* config options here */
|
|
output: "standalone",
|
|
// 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 || "",
|
|
env: {
|
|
APP_VERSION: packageJson.version,
|
|
},
|
|
// Include instrumentation.ts in standalone build for Langfuse telemetry
|
|
outputFileTracingIncludes: {
|
|
"*": ["./instrumentation.ts"],
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|