1// Reference output for agent/human review — not executed by tests.
2// After the Shape 1 (shared-helper) CSP patch is applied, apps/web/next.config.ts
3// should look like this.
4
5import {
6 buildSupabaseRemotePatterns,
7 createBaseNextConfig,
8} from "@app/shared/next-config";
9import type { NextConfig } from "next";
10
11const posthogHost =
12 process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://us.i.posthog.com";
13
14// Dev-only allowance so impeccable live mode can load. Guarded by NODE_ENV;
15// empty array in any non-development environment.
16const __impeccableLiveDev =
17 process.env.NODE_ENV === "development" ? ["http://localhost:8400"] : [];
18
19const baseConfig = createBaseNextConfig({
20 appName: "web",
21 enableMapbox: true,
22 additionalImgSrc: ["https:", "https://*.googleusercontent.com"],
23 additionalScriptSrc: [posthogHost, ...__impeccableLiveDev],
24 additionalConnectSrc: [posthogHost, ...__impeccableLiveDev],
25});
26
27const nextConfig: NextConfig = {
28 ...baseConfig,
29
30 devIndicators: {
31 position: "bottom-right",
32 },
33
34 experimental: {
35 ...baseConfig.experimental,
36 },
37
38 typescript: {
39 ignoreBuildErrors: true,
40 },
41
42 images: {
43 remotePatterns: buildSupabaseRemotePatterns(),
44 dangerouslyAllowLocalIP: process.env.NODE_ENV === "development",
45 },
46};
47
48export default nextConfig;