openreader/next.config.ts
Richard R 9f25e05cce feat(previews): implement document preview generation and caching
- Add document preview caching logic with in-memory and persisted storage.
- Implement S3 blobstore functions for managing document previews.
- Create rendering functions for PDF and EPUB cover images to JPEG format.
- Introduce database schema and functions for managing document preview metadata.
- Add unit tests for rendering PDF and EPUB previews.
2026-02-12 16:05:03 -07:00

29 lines
803 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
turbopack: {
resolveAlias: {
canvas: '@napi-rs/canvas',
},
},
serverExternalPackages: ["@napi-rs/canvas", "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;