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

Only require needed lodash modules #10

Closed
adriaanmeuris opened this issue Aug 3, 2016 · 2 comments
Closed

Only require needed lodash modules #10

adriaanmeuris opened this issue Aug 3, 2016 · 2 comments

Comments

@adriaanmeuris
Copy link

Great library, works better out of the box than vue-sortable in my opinion.

One improvement I think is to only required the needed lodash modules for your directive.

Now the entire lodash library is included (about 80kb minified):
var _ = require("lodash");

You could simply require the needed modules (about 21kb minified):
var _clone = require("lodash/clone");
var _merge = require("lodash/merge");
var _isString = require("lodash/isString");
var _each = require("lodash/each");

.. which would save about 60kb.

@David-Desmaisons
Copy link
Member

Seems a good idea. I'm now working on #8 that may increase the number of lodash functions in use by Vue.Dragable.For. So, I will consider issue#10 once I am done with #8 .

@David-Desmaisons
Copy link
Member

New version is not using lodash anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants