Contents

@posthog/plugin-utils

2.0.1

Patch Changes

  • #5202 7199f24 Thanks @hpouillot! - Support immutable Next.js 16 Turbopack sourcemaps without rewriting build assets, and require a compatible posthog-js runtime for native debug and release IDs. (2026-10-09)

2.0.0

Major Changes

  • #4705 dd5888a Thanks @ablaszkiewicz! - Change the default sourcemaps.releaseMode to event: set sourcemaps.releaseMode: 'symbol-set', or POSTHOG_RELEASE_MODE=symbol-set, to keep binding uploaded symbol sets to a release. The @posthog/plugin-utils bump is major, so an installed plugin keeps the old default until the plugin itself is upgraded.

    event mode requires a posthog-cli with release resolve and --release-mode, and posthog-js 1.409.0, posthog-node 5.47.0, or @posthog/core 1.46.0 at runtime. An older CLI fails a rollup build and skips the upload on webpack and Next.js. An older SDK reports no release on exceptions. (2026-09-02)

1.2.0

Minor Changes

  • #4541 74d8f5a Thanks @ablaszkiewicz! - Add experimental sourcemaps.releaseMode: 'event' to the rollup plugin. In event mode the plugin resolves the release with posthog-cli release resolve and injects its id into every chunk, so exceptions report their release directly instead of it being bound to the uploaded symbol sets, and chunk ids are derived from chunk content so a rebuild of unchanged code reuses the symbol set already uploaded. The option defaults to the POSTHOG_RELEASE_MODE environment variable and then to symbol-set, which behaves exactly as before. Event mode needs a posthog-cli with the release resolve command. (2026-08-19)

1.1.3

Patch Changes

  • #4512 1030636 Thanks @ablaszkiewicz! - Inject chunk ids (a fresh random id per build) into chunks in-memory during renderChunk instead of letting posthog-cli rewrite the emitted files on disk in writeBundle. The written bundle already contains the chunk-id snippet, so Subresource Integrity plugins (e.g. vite-plugin-sri3, which hashes chunks in generateBundle) now compute hashes over the final content and the browser no longer blocks the scripts. writeBundle runs the non-mutating sourcemap upload instead of sourcemap process, and with deleteAfterUpload the plugin deletes the .map files itself rather than passing --delete-after (which also rewrites the .js files). (2026-08-13)

1.1.2

Patch Changes

1.1.1

Patch Changes

  • #3426 1a0b58d Thanks @marandaneto! - Trim surrounding whitespace from user-provided API keys, personal API keys, and host config values before using them. (2026-04-21)

1.1.0

Minor Changes

  • #3418 04d276c Thanks @turnipdabeets! - Add build to sourcemaps config, forwarded to posthog-cli as --build. Lets consumers of the bundler plugins (webpack, rollup, nextjs-config, nuxt) attach a build number as release metadata. Requires posthog-cli >= 0.7.8. (2026-04-19)

1.0.1

Patch Changes

  • #3309 197eeda Thanks @marandaneto! - Extract CLI and sourcemap utilities from @posthog/core into @posthog/plugin-utils to remove cross-spawn from React Native dependencies (2026-04-01)