-
Notifications
You must be signed in to change notification settings - Fork 167
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
Browser bundle is very large #192
Comments
Everybody should be supporting older browsers/runtimes, so I won't be removing any of the shims - also, "zero dependencies" is not a good metric to shoot for. More deps are better. I'd be interested in refactoring to avoid uses of Separately, if there's a way |
Good to know what would line up with your opinions if I were to open a PR. Removing dependencies on I disagree with your point that we should aim to support all older runtimes (I believe this is currently as far reaching as IE8/Node 0.4?). Or that more/less dependencies is strictly better than the other. Nonetheless, there is less to be gained with removing shims so I'll end the discussion there.
|
One more point, the readme has this line:
If |
My hope would be to avoid a breaking change for as much of it as possible, and to make the breaking change for users who want the formidable behavior to be as minimal as possible.
|
I'm still happy to accept a PR that removes the |
|
I'm currently trying to use this library for isomporphic form validation/rendering. However, this lifted my (uncompressed) JS size from ~700kb to 3.1mb.
After removing
formidable
,async
andqs
as dependencies (formidable has the largest contribution), and leaving the server implementation to parse form data, my bundle size is sitting at around 900kb. You can see the fork hereYou could also remove the dependencies on shims (
object-keys
,is
,object.assign
,string.prototype.trim
), if you just specified that people who want support for older browsers/runtimes need to include polyfills themselves.That will result in zero dependencies with almost no loss in functionality. The changes being:
I know legacy support is an important feature for this library, as is ease of "plug and play" use, so I wanted to see if there was any interest in reducing dependencies.
The text was updated successfully, but these errors were encountered: