Skip to content

Commit 98ec2c9

Browse files
fix build
1 parent 600cefb commit 98ec2c9

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

packages/web/next.config.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
await import("./src/env.mjs");
22
import { withSentryConfig } from "@sentry/nextjs";
3-
import { env } from "./src/env.mjs";
43

54

65
/** @type {import('next').NextConfig} */
@@ -16,15 +15,15 @@ const nextConfig = {
1615
return [
1716
{
1817
source: "/ingest/static/:path*",
19-
destination: `${env.NEXT_PUBLIC_POSTHOG_ASSET_HOST}/static/:path*`,
18+
destination: `https://us-assets.i.posthog.com/static/:path*`,
2019
},
2120
{
2221
source: "/ingest/:path*",
23-
destination: `${env.NEXT_PUBLIC_POSTHOG_HOST}/:path*`,
22+
destination: `https://us.i.posthog.com/:path*`,
2423
},
2524
{
2625
source: "/ingest/decide",
27-
destination: `${env.NEXT_PUBLIC_POSTHOG_HOST}/decide`,
26+
destination: `https://us.i.posthog.com/decide`,
2827
},
2928
];
3029
},

packages/web/src/env.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,13 @@ export const env = createEnv({
3131
SOURCEBOT_ROOT_DOMAIN: z.string().default("localhost:3000"),
3232
NODE_ENV: z.enum(["development", "test", "production"]),
3333
SOURCEBOT_TELEMETRY_DISABLED: z.enum(["true", "false"]).default("false"),
34+
DATABASE_URL: z.string().url(),
3435
},
3536
// @NOTE: Make sure you destructure all client variables in the
3637
// `experimental__runtimeEnv` block below.
3738
client: {
3839
// PostHog
3940
NEXT_PUBLIC_POSTHOG_PAPIK: z.string().optional(),
40-
NEXT_PUBLIC_POSTHOG_HOST: z.string().url().default('https://us.i.posthog.com'),
41-
NEXT_PUBLIC_POSTHOG_ASSET_HOST: z.string().url().default('https://us-assets.i.posthog.com'),
4241
NEXT_PUBLIC_POSTHOG_UI_HOST: z.string().url().default('https://us.posthog.com'),
4342

4443
// Misc
@@ -48,8 +47,6 @@ export const env = createEnv({
4847
// For Next.js >= 13.4.4, you only need to destructure client variables:
4948
experimental__runtimeEnv: {
5049
NEXT_PUBLIC_POSTHOG_PAPIK: process.env.NEXT_PUBLIC_POSTHOG_PAPIK,
51-
NEXT_PUBLIC_POSTHOG_HOST: process.env.NEXT_PUBLIC_POSTHOG_HOST,
52-
NEXT_PUBLIC_POSTHOG_ASSET_HOST: process.env.NEXT_PUBLIC_POSTHOG_ASSET_HOST,
5350
NEXT_PUBLIC_POSTHOG_UI_HOST: process.env.NEXT_PUBLIC_POSTHOG_UI_HOST,
5451
NEXT_PUBLIC_SOURCEBOT_VERSION: process.env.NEXT_PUBLIC_SOURCEBOT_VERSION,
5552
NEXT_PUBLIC_POLLING_INTERVAL_MS: process.env.NEXT_PUBLIC_POLLING_INTERVAL_MS,

0 commit comments

Comments
 (0)