import type { NextConfig } from "next";

/**
 * OpenNext miniflare/wrangler integration only when you need Cloudflare bindings in `next dev`
 * (e.g. `getCloudflareContext`). Leave unset for normal local dev — avoids extra patching and
 * races with the dev server.
 *
 * OPENNEXT_CLOUDFLARE_DEV=1 npm run dev
 */
if (process.env.OPENNEXT_CLOUDFLARE_DEV === "1") {
  void import("@opennextjs/cloudflare").then((m) => m.initOpenNextCloudflareForDev());
}

const nextConfig: NextConfig = {};

export default nextConfig;
