Closed benjackwhite closed 1 year ago
Ack! This breaks all non-Node runtimes (ex. Cloudflare) because Axios v1 doesn’t provide the correct non-Node ESM exports, which leads them to try and import a bunch of node modules, which they can’t.
A few potential fixes off the top of my head:
fetch
(now that fetch
is in all LTS versions, this might not be unreasonable; it would also mean non-Node runtimes don’t have to add fetch
as a parameter when instantiating PostHog)package.json#exports
Problem
Fixes https://github.com/PostHog/posthog-js-lite/issues/121
Changes
User mentioned our axios dep is somewhat outdated. The vulnerability mentioned shouldn't affect us given we only call our own endpoint, but nonetheless worth keeping up to date.
Release info Sub-libraries affected
Bump level
Libraries affected
Testing
Tested locally with the example and all seemed fine