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

The installation size is large due to the dependency on @remiux-run/node. #1229

Open
L4Ph opened this issue Mar 6, 2025 · 3 comments
Open

Comments

@L4Ph
Copy link

L4Ph commented Mar 6, 2025

The current install size of @tanstack/react-form is 24MB.
https://packagephobia.com/result?p=@tanstack/react-form

Image

Someone has already asked me about this on my behalf and I understand that you have also responded about it.
https://x.com/tannerlinsley/status/1897323043510431970

It's 11.8kb min. Don't use packagephobia or bundlephobia.

What's the problem?

I see the problem as being that it is just a form and a package of wrappers for it, which is such a large installation size.
Just doing the npm i @tanstack/react-form generates about 30 MB of communication.
This is not very desirable for CI or for developers who have pipelines in place for builds.

In fact, I have not been able to employ this in a new product I am creating because I am afraid of it.

What is this package used for?

That's it. Just those three lines.
https://packagephobia.com/result?p=%40remix-run%2Fnode

import { createCookie } from '@remix-run/node'

export const _tanstackInternalsCookie = createCookie('_tanstack_form_internals')

https://github.com/TanStack/form/blob/main/packages%2Freact-form%2Fsrc%2Fstart%2Futils.ts

This improvement alone will reduce the package installation size to about 1 MB.
Perhaps hopefully the post-bundle size can be further reduced as well.

@L4Ph
Copy link
Author

L4Ph commented Mar 6, 2025

About the questions that will probably come up.

Q. Why not just use a cache (in CI/CD)?
A. Yes, of course I agree, and I am sure everyone is already doing so.
But it's not very nice for developers to have to allocate so much disk space and network bandwidth, even temporarily, just for the form library and its wrappers.
If the installation size can be kept small, it should be.

@crutchcorn
Copy link
Member

This is great research, we'll remove that dep in favor of something else.

At the same time please do not tag specific maintainers - it's in poor taste.

@L4Ph
Copy link
Author

L4Ph commented Mar 6, 2025

Tanner was the one who answered this in X, and since I was new to sending an issue to a repository of this size and organization, I felt it would be quicker to ask Tanner, so I was menshoning...
I am so sorry...
I will turn it off.

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