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.
29 lines
786 B
TypeScript
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;
|