ppt-tool/frontend/next.config.mjs
Vadym Samoilenko ff9cdffc32 Phase 5: Fix export, slide edit, static files; add README
- Fix PPTX/PDF export: Puppeteer URL port mismatch (80 → 3000)
- Fix backend export_utils to use NEXT_INTERNAL_URL env var
- Add Chromium to frontend Dockerfile for Docker-based export
- Fix slide edit socket hang up with asyncio.wait_for() timeouts
- Add FastAPI StaticFiles mounts for /static and /app_data
- Add Next.js rewrite for /static/ to proxy to backend
- Show template thumbnail in master decks admin page
- Add error logging to ReviewWorkflow component
- Add Docker env vars for web service (APP_DATA_DIRECTORY, app_data volume)
- Add project README in English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:40:36 +00:00

70 lines
1.4 KiB
JavaScript

const API_URL = process.env.API_INTERNAL_URL || 'http://localhost:8000';
const nextConfig = {
reactStrictMode: false,
distDir: ".next-build",
// Proxy API and static asset requests to FastAPI backend
async rewrites() {
return [
{
source: '/api/v1/:path*',
destination: `${API_URL}/api/v1/:path*`,
},
{
source: '/app_data/:path*',
destination: `${API_URL}/app_data/:path*`,
},
{
source: '/static/:path*',
destination: `${API_URL}/static/:path*`,
},
];
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "pub-7c765f3726084c52bcd5d180d51f1255.r2.dev",
},
{
protocol: "https",
hostname: "pptgen-public.ap-south-1.amazonaws.com",
},
{
protocol: "https",
hostname: "pptgen-public.s3.ap-south-1.amazonaws.com",
},
{
protocol: "https",
hostname: "img.icons8.com",
},
{
protocol: "https",
hostname: "present-for-me.s3.amazonaws.com",
},
{
protocol: "https",
hostname: "yefhrkuqbjcblofdcpnr.supabase.co",
},
{
protocol: "https",
hostname: "images.unsplash.com",
},
{
protocol: "https",
hostname: "picsum.photos",
},
{
protocol: "https",
hostname: "unsplash.com",
},
],
},
};
export default nextConfig;