posthog-js
posthog-js copied to clipboard
Preact as a dependency and not peer dependency
I'm wondering if it was intentional to ship Preact with the base posthog-js package as a dependency rather than as a peerDependency or as an optionalDependency?
Referencing this line here:
https://github.com/PostHog/posthog-js/blob/ac7525eab9632d352d0a8d1a0532abcca70d1a5d/package.json#L42
May I suggest we have the core package, maybe under:
@posthog/core
Which doesn't bundle with preact, and the 😀
@posthog/surveys etc for anything where a decision has been made to include UI elements?
I'm also concerned about this - especially because preact seems to be pretty heavy (Unpacked Size 1.42 MB, according to https://www.npmjs.com/package/preact )
@lukaselmer I did see this:
https://github.com/PostHog/posthog-js-lite
Thanks @michealroberts!