Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Lodash optimization #31

Merged
merged 2 commits into from
Feb 6, 2018

Conversation

wmcmurray
Copy link
Contributor

When you do import _ from 'lodash' the whole lodash lib gets included in the bundled files and it weights a lot. By importing only the functions used, I was able to go from this :

dist/vue-scroll.js 532.04kb
dist/vue-scroll.min.js 70.56kb (gzipped: 24.53kb)
dist/vue-scroll.common.js 4.23kb
dist/vue-scroll.esm.js 4.08kb

to this :

dist/vue-scroll.js 23.30kb
dist/vue-scroll.min.js 4.59kb (gzipped: 2.02kb)
dist/vue-scroll.common.js 4.54kb
dist/vue-scroll.esm.js 4.29kb

Which is a pretty good improvement if you ask me 🙂 !

@wangpin34
Copy link
Owner

Looks good to me. Thanks for your great work. 👍

@wangpin34 wangpin34 merged commit 00e55d3 into wangpin34:2.0-compatible Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants