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

Replace lodash with homemade functions #112

Merged
merged 1 commit into from Nov 30, 2019

Conversation

Aareksio
Copy link

@Aareksio Aareksio commented Nov 30, 2019

I'm not particularly happy of the Tippy + Popper bundle being whopping 32kB and this wrapper package adding 47kB is a joke.

PR demonstrates how you could reduce it's size by replacing lodash.<module> dependencies with functions crafted to your needs. It's still enormous, but the change shoved off roughly 20kB. If such replacement is no-no, consider at least replacing lodash.<module> with lodash-es, as mapValues and pickBy overlaps and lodash-es is more likely an existing dependency of final app than lodash.<module>.

For anyone willing to use it now in their webpack process (works for me, no test included / passed):
npm i Aareksio/vue-tippy#fix-module-size

import VueTippy, { TippyComponent } from 'vue-tippy/src/index';

Vue.use(VueTippy);
Vue.component("tippy", TippyComponent);

@KABBOUCHI KABBOUCHI merged commit 7b36e6b into KABBOUCHI:master Nov 30, 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.

None yet

2 participants