Files
wehub-resource-sync d68f003000
CI / Change detection (push) Has been cancelled
CI / Version drift (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Workflow RLM cache (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / npm wrapper smoke (push) Has been cancelled
CI / Mobile runtime smoke (push) Has been cancelled
CI / Workflow lint (push) Has been cancelled
CI / Documentation (push) Has been cancelled
Web Frontend / Lint & Type Check (push) Failing after 1s
Auto-close harvested PRs / close (push) Failing after 1s
cargo-deny / cargo-deny (bans licenses sources) (push) Failing after 1s
Security audit / cargo-audit (push) Failing after 1s
Sync to CNB / sync (push) Failing after 1s
Web Frontend / Deploy to Cloudflare (push) Waiting to run
cargo-deny / cargo-deny (advisories) (push) Failing after 3s
chore: import upstream snapshot with attribution
2026-07-13 12:08:23 +08:00

30 lines
953 B
TypeScript

import type { NextConfig } from "next";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
const webRoot = dirname(fileURLToPath(import.meta.url));
// Security headers are set in middleware.ts (more reliable under OpenNext on
// Cloudflare than next.config.ts headers(), which doesn't always apply to
// prerendered/cached responses).
const nextConfig: NextConfig = {
outputFileTracingRoot: webRoot,
reactStrictMode: true,
images: {
remotePatterns: [
{ protocol: "https", hostname: "avatars.githubusercontent.com" },
],
},
typedRoutes: false,
};
export default nextConfig;
if (process.env.NODE_ENV === "development") {
// Initialize Cloudflare bindings (KV, etc.) when running `next dev`.
// No-op in production builds.
void import("@opennextjs/cloudflare").then(({ initOpenNextCloudflareForDev }) => {
initOpenNextCloudflareForDev();
}).catch(() => { /* dev-only convenience */ });
}