yap-blog/next.config.ts
matt 3175bd9172 Add JSON import/export backup on the settings page
Export downloads a versioned JSON snapshot of all posts, pages, tags,
navigation, and settings from GET /api/admin/export. Cross-references
are keyed by slug rather than database id, so a backup restores cleanly
into any database. Import (a new settings-page section) validates the
file and atomically replaces all content in one transaction, sanitizing
bodies at the trust boundary; users, sessions, and uploaded files are
untouched. Server-action body limit raised so backups fit in the
import upload.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 20:53:38 -04:00

16 lines
511 B
TypeScript

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Pin the workspace root so stray lockfiles in parent directories
// don't confuse Turbopack's project detection.
turbopack: { root: __dirname },
experimental: {
// Site-import uploads carry a whole backup in one action request;
// the default 1 MB cap is far too small. Imports themselves are
// capped at 20 MB in importSiteAction.
serverActions: { bodySizeLimit: "25mb" },
},
};
export default nextConfig;