import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", serverExternalPackages: ["tdl", "prebuilt-tdlib"], // The Database page was folded into the Library. Old bookmarks — and any // script hitting the old API paths — keep working. async redirects() { return [ { source: "/admin/database", destination: "/admin/library", permanent: true }, // The flat catalog moved one level down; the grouped listing owns // /api/library now. Listed first so it wins over the wildcard below. { source: "/api/database", destination: "/api/library/entries", permanent: true, }, { source: "/api/database/:path*", destination: "/api/library/:path*", permanent: true, }, ]; }, images: { remotePatterns: [ { protocol: "https", hostname: "is1-ssl.mzstatic.com", }, ], }, }; export default nextConfig;