feat(web): migrate from pages to workers and add posthog analytics

This commit is contained in:
Aman Varshney
2025-07-13 13:44:09 +05:30
parent bd136792df
commit 864e863656
8 changed files with 2009 additions and 141 deletions

View File

@@ -5,10 +5,27 @@ const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
output: "export",
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
experimental: {
reactCompiler: true,
},
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*",
},
{
source: "/ingest/decide",
destination: "https://us.i.posthog.com/decide",
},
];
},
};
export default withMDX(config);