Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: ingest events

sriram veeraghanta57f2445bb868
diff --git a/web/lib/posthog-provider.tsx b/web/lib/posthog-provider.tsx
index 1f8f6f64ac..dad0edba50 100644
--- a/web/lib/posthog-provider.tsx
+++ b/web/lib/posthog-provider.tsx
@@ -42,9 +42,9 @@ const PostHogProvider: FC<IPosthogWrapper> = (props) => {
}, [user, workspaceRole, projectRole]);
useEffect(() => {
- if (posthogAPIKey && posthogHost) {
+ if (posthogAPIKey && (process.env.NEXT_PUBLIC_POSTHOG_HOST || posthogHost)) {
posthog.init(posthogAPIKey, {
- api_host: posthogHost || "https://app.posthog.com",
+ api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || posthogHost || "https://app.posthog.com",
debug: process.env.NEXT_PUBLIC_POSTHOG_DEBUG === "1", // Debug mode based on the environment variable
autocapture: false,
capture_pageview: false, // Disable automatic pageview capture, as we capture manually
diff --git a/web/next-env.d.ts b/web/next-env.d.ts
index 4f11a03dc6..fd36f9494e 100644
--- a/web/next-env.d.ts
+++ b/web/next-env.d.ts
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
+/// <reference types="next/navigation-types/compat/navigation" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/web/next.config.js b/web/next.config.js
index 256183e31a..82405ce456 100644
--- a/web/next.config.js
+++ b/web/next.config.js
@@ -3,6 +3,9 @@ require("dotenv").config({ path: ".env" });
const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = {
+ reactStrictMode: false,
+ swcMinify: true,
+ output: "standalone",
async headers() {
return [
{
@@ -11,8 +14,6 @@ const nextConfig = {
},
];
},
- reactStrictMode: false,
- swcMinify: true,
images: {
remotePatterns: [
{
@@ -22,7 +23,18 @@ const nextConfig = {
],
unoptimized: true,
},
- output: "standalone",
+ 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*",
+ },
+ ]
+ }
};
if (parseInt(process.env.NEXT_PUBLIC_ENABLE_SENTRY || "0", 10)) {
diff --git a/web/tsconfig.json b/web/tsconfig.json
index 8fcf13199f..310d42730d 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -1,13 +1,28 @@
{
"extends": "tsconfig/nextjs.json",
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
- "exclude": ["node_modules"],
+ "include": [
+ "next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx",
+ ".next/types/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ],
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"esModuleInterop": true,
"paths": {
- "@/*": ["*"]
- }
+ "@/*": [
+ "*"
+ ]
+ },
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "strictNullChecks": true
}
}