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

Remove lodash - reduces the size of the lib #89

Merged
merged 4 commits into from Aug 31, 2015
Merged

Conversation

KidkArolis
Copy link
Contributor

Not 100% sure about this one yet. There are 2 other possibilities here:

  1. Use native es5 methods to decrease the size further and require old browsers to be polyfilled
  2. Use lodash 4 which seems to not bring any overhead either (Use lodash v4 reduxjs/redux#611) (this also requires Add pushState/hashChange support to CherryTree out of the box #1).

@KidkArolis
Copy link
Contributor Author

Massively might be an overstatement, but the standalone.js bundle goes from 12.82KB down to 8.21KB gzipped.

@KidkArolis KidkArolis force-pushed the remove-lodash branch 3 times, most recently from b14a586 to 03325ed Compare August 31, 2015 10:30
@KidkArolis
Copy link
Contributor Author

Switching away from lodash to es5 methods, since babel usage already requires es5 environment (perhaps not the features used in this project, but oh well).

I tried setting up IE8 tests to run on Sauce Labs, but karma, babel, co and other projects were causing issues. I got stuck with getting babel code to execute there, so for now, we'll run the tests on IE9 and up. I've increased the browser matrix to quite a few more browsers including the edge versions of chrome, firefox and ie.

I've removed lodash both from lib code and supporting code, such as tests and config files. The code is simple enough to not warrant the need for lodash. The lib is smaller this way, so that's cool.

@KidkArolis KidkArolis changed the title Remove lodash - massively reduces the size of the lib Remove lodash - reduces the size of the lib Aug 31, 2015
KidkArolis added a commit that referenced this pull request Aug 31, 2015
Remove lodash - reduces the size of the lib
@KidkArolis KidkArolis merged commit 88c55a4 into master Aug 31, 2015
@KidkArolis KidkArolis deleted the remove-lodash branch August 31, 2015 15:19
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.

None yet

2 participants