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

Custom lodash update #75

Closed
wants to merge 2 commits into from
Closed

Custom lodash update #75

wants to merge 2 commits into from

Conversation

janzheng
Copy link

Hey there, I removed lodash as a requirement from package.json and included a custom lodash file in other/lodash.min.js. The generator command is in a line in package.json called genlodash in case it needs to be appended.

I also added a new grunt command to build a browserified version, and regenerated the airtable.browser.js build. It's a lot smaller now (from 646kb to 144kb)!

@EvanHahn
Copy link
Contributor

EvanHahn commented Nov 26, 2018 via email

@janzheng
Copy link
Author

That's a good point, and that's entirely up to you — doing it that way will increase flexibility and ease development, but it would add slightly more size to the build. I was trying to make the browser build as tiny as possible by removing as much extra lodash stuff as possible

@EvanHahn
Copy link
Contributor

EvanHahn commented Nov 26, 2018 via email

@janzheng
Copy link
Author

janzheng commented Nov 26, 2018 via email

kasrak pushed a commit that referenced this pull request Nov 28, 2018
…al (#76)

The minified size went from 216 KB to 122 KB. Did three things:

1. Instead of _.isArray, we use things like var isArray = require('lodash/isArray')
2. Removed the async package; we weren't using it for much
3. Replaced some of Lodash's methods with native methods (like _.isUndefined(x) with x === void 0.

See #75.
@EvanHahn
Copy link
Contributor

I'm going to close this issue because we'll soon release a version that lowers the minified size to 122 KB. Thanks for bringing this to our attention—we'll update you when we release the new version.

@EvanHahn EvanHahn closed this Nov 28, 2018
@janzheng
Copy link
Author

janzheng commented Nov 28, 2018 via email

@EvanHahn
Copy link
Contributor

We just released airtable@0.5.8 which shrinks the minified size by almost half. Thanks for bringing this up with us!

@janzheng
Copy link
Author

janzheng commented Nov 29, 2018 via email

@EvanHahn EvanHahn mentioned this pull request Dec 4, 2019
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

Successfully merging this pull request may close these issues.

2 participants