mirror of
https://github.com/jakejarvis/hoot.git
synced 2025-10-18 20:14:25 -04:00
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import { withPostHogConfig } from "@posthog/nextjs-config";
|
|
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
experimental: {
|
|
ppr: "incremental",
|
|
reactCompiler: true,
|
|
inlineCss: true,
|
|
staleTimes: {
|
|
dynamic: 0, // disable client-side router cache for dynamic pages
|
|
},
|
|
},
|
|
serverExternalPackages: ["@sparticuz/chromium", "puppeteer-core"],
|
|
images: {
|
|
unoptimized: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "8ubelavjx21gjm2t.public.blob.vercel-storage.com",
|
|
},
|
|
],
|
|
},
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/_ingest/static/:path*",
|
|
destination: "https://us-assets.i.posthog.com/static/:path*",
|
|
},
|
|
{
|
|
source: "/_ingest/:path*",
|
|
destination: "https://us.i.posthog.com/:path*",
|
|
},
|
|
];
|
|
},
|
|
// This is required to support PostHog trailing slash API requests
|
|
skipTrailingSlashRedirect: true,
|
|
};
|
|
|
|
export default withPostHogConfig(nextConfig, {
|
|
personalApiKey: process.env.POSTHOG_API_KEY as string,
|
|
envId: process.env.POSTHOG_ENV_ID as string,
|
|
host: process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://us.i.posthog.com",
|
|
sourcemaps: {
|
|
enabled: true,
|
|
},
|
|
});
|