floating-vue icon indicating copy to clipboard operation
floating-vue copied to clipboard

Support tree shaking

Open mrodal opened this issue 6 years ago • 4 comments

This library is great, but is also quite big.. I just want a small little tooltip, and it costs me 60KB unzipped counting v-tooltip and popper.. Could you support tree shaking in order to use only what we need?

Thanks!

mrodal avatar May 19 '19 18:05 mrodal

Is this what you mean?

import Vue from 'vue'
import { VTooltip, VPopover, VClosePopover } from 'v-tooltip'

Vue.directive('tooltip', VTooltip)
Vue.directive('close-popover', VClosePopover)
Vue.component('v-popover', VPopover)

https://github.com/Akryum/v-tooltip#npm

christhofer avatar Jul 18 '19 09:07 christhofer

using import { VTooltip } from 'v-tooltip'; and import VTooltip from "v-tooltip";

are yielding the same bundle size for me.

I am also looking to reduce my bundle sizes wherever possible. I am only using "VTooltip". v-tooltip.esm.js: start 140.84KB, parsed: 43.25KB, gzipped: 13.41KB "v-tooltip": "^2.0.3"

colinblaise avatar Apr 21 '20 19:04 colinblaise

sorry to bump an old topic but the bundle size is a bit large for just displaying a tooltip

mavrick avatar Feb 20 '24 07:02 mavrick