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

Large package size #32

Open
ryanb-jobber opened this issue Jan 5, 2024 · 2 comments
Open

Large package size #32

ryanb-jobber opened this issue Jan 5, 2024 · 2 comments
Assignees

Comments

@ryanb-jobber
Copy link

ryanb-jobber commented Jan 5, 2024

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
Copy link
Contributor

dboskovic commented Jan 5, 2024

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
Copy link
Author

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

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

3 participants