Bug Description
If withPostHogConfig is not the last config wrapper in next.config.js, the PostHog build plugin does not do anything. It does not error, produce logs of any kind (even with log level set to debug), or upload source maps.
Moving withPostHogConfig to be the last wrapper makes it work as expected.
How to reproduce
- Wrap your next config with withPostHogConfig per the docs
- Wrap that with something like withNextIntl from next-intl
- Run your build. See that no source maps get generated or uploaded. With the PostHogConfig having log level set to debug, see there are no logs output from the posthog tool.
- Then put withPostHogConfig as the last wrapper and see that it works as expected.
Additional context
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Bug Description
If withPostHogConfig is not the last config wrapper in next.config.js, the PostHog build plugin does not do anything. It does not error, produce logs of any kind (even with log level set to debug), or upload source maps.
Moving withPostHogConfig to be the last wrapper makes it work as expected.
How to reproduce
Additional context
Debug info