knocklabs / javascript

Official JavaScript packages for interacting with Knock
https://knock.app/
MIT License
15 stars 3 forks source link

feat: switch to date-fns intlFormatDistance to reduce bundle size #46

Closed connorlindsey closed 8 months ago

connorlindsey commented 8 months ago

Switches from formatDistance to intlFormatDistance which uses the built-in browser Intl object for formatting relative times: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#browser_compatibility

This should greatly reduce the bundle size.

Fixes #18

TODO:

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 142d363a711191b3b8c1c9c8de5f72efd8fba43f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | --------------------- | ----- | | @knocklabs/react-core | Patch | | @knocklabs/react | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR