chore: disable PostHog telemetry in development mode (#1365)
* chore: disable PostHog telemetry in development mode Skip posthog.init() when import.meta.env.DEV is true to avoid sending telemetry data during local development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Rin <shinohara-rin@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,8 @@ import posthog from 'posthog-js'
|
||||
|
||||
import { DEFAULT_POSTHOG_CONFIG, POSTHOG_PROJECT_KEY_DOCS } from '../../../posthog.config'
|
||||
|
||||
posthog.init(POSTHOG_PROJECT_KEY_DOCS, {
|
||||
...DEFAULT_POSTHOG_CONFIG,
|
||||
// Project-specific config...
|
||||
})
|
||||
if (!import.meta.env.DEV) {
|
||||
posthog.init(POSTHOG_PROJECT_KEY_DOCS, {
|
||||
...DEFAULT_POSTHOG_CONFIG,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user