Skip to content

fix: prevent bundlers from resolving optional posthog-js at build time#7

Merged
SvenAlHamad merged 1 commit into
v3from
bruno/fix/v3/posthog-js-blocking-build
Jun 3, 2026
Merged

fix: prevent bundlers from resolving optional posthog-js at build time#7
SvenAlHamad merged 1 commit into
v3from
bruno/fix/v3/posthog-js-blocking-build

Conversation

@brunozoric
Copy link
Copy Markdown
Collaborator

Use an opaque variable specifier plus webpackIgnore/vite-ignore magic comments so no bundler tries to resolve posthog-js during the build. Apps that don't install posthog-js will no longer fail to compile.

Use an opaque variable specifier plus webpackIgnore/vite-ignore magic
comments so no bundler tries to resolve posthog-js during the build.
Apps that don't install posthog-js will no longer fail to compile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@brunozoric brunozoric requested a review from SvenAlHamad June 3, 2026 18:42
@brunozoric brunozoric self-assigned this Jun 3, 2026
@SvenAlHamad SvenAlHamad merged commit ce80d70 into v3 Jun 3, 2026
5 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

🎉 This PR is included in version 3.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants