openreader/next.config.ts
Richard R 4e2d18962d fix(config): update ffmpeg tracing for audiobook APIs
Configure Next.js output tracing to properly include ffmpeg and ffprobe
static binaries for audiobook processing endpoints. This ensures the
required binaries are bundled correctly during deployment across all
audiobook API routes.
2026-02-11 03:20:22 -07:00

29 lines
786 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
turbopack: {
resolveAlias: {
canvas: './empty-module.ts',
},
},
serverExternalPackages: ["better-sqlite3", "ffmpeg-static", "ffprobe-static"],
outputFileTracingIncludes: {
'/api/audiobook': [
'./node_modules/ffmpeg-static/ffmpeg',
'./node_modules/ffprobe-static/bin/*/*/ffprobe',
],
'/api/audiobook/chapter': [
'./node_modules/ffmpeg-static/ffmpeg',
'./node_modules/ffprobe-static/bin/*/*/ffprobe',
],
'/api/audiobook/status': [
'./node_modules/ffmpeg-static/ffmpeg',
'./node_modules/ffprobe-static/bin/*/*/ffprobe',
],
'/api/whisper': [
'./node_modules/ffmpeg-static/ffmpeg',
],
},
};
export default nextConfig;