Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preact as a dependency and not peer dependency #1432

Open
michealroberts opened this issue Sep 23, 2024 · 3 comments
Open

Preact as a dependency and not peer dependency #1432

michealroberts opened this issue Sep 23, 2024 · 3 comments

Comments

@michealroberts
Copy link

michealroberts commented Sep 23, 2024

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:

"preact": "^10.19.3",

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?

@lukaselmer
Copy link

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 )

@michealroberts
Copy link
Author

@lukaselmer I did see this:

https://github.com/PostHog/posthog-js-lite

@lukaselmer
Copy link

Thanks @michealroberts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants