FlatFilers / flatfile-node

Official Node.js SDK for the Flatfile API
MIT License
9 stars 5 forks source link

Large package size #32

Open ryanb-jobber opened 10 months ago

ryanb-jobber commented 10 months ago

Slack logo #triage-eng-support thread

The @flatfile/api package is quite large when imported into a React project. I am only using a few API calls to fetch records from a sheet but as a result I've added nearly 2MB to my asset bundle.

Is it possible to produce a more minified version of this library?

Screenshot 2024-01-04 at 4 56 29 PM

Front logo Front conversations

dboskovic commented 10 months ago

We absolutely agree. We're working hard to fix this. This version of the API package has the same types with less middleware. https://www.npmjs.com/package/@flatfile/api-preview

It is likely to replace the @flatfile/api package in the near future. However we still have an issue where this package casts date values to Dates and the new package does not. That should not affect anything, but please be aware of it.

In order to use this package you'll need to alias @flatfile/api to @flatfile/api-preview in your npm.

https://github.com/npm/rfcs/blob/main/implemented/0001-package-aliases.md#detailed-explanation

ryanb-jobber commented 10 months ago

Thanks @dboskovic , do you have an example of how to do the install/alias of the preview package? I'm having an issue with peer dependencies, e.g from @flatfile/listener