simplesmiler / vue-focus

A reusable focus directive for reusable Vue.js components
MIT License
406 stars 40 forks source link

bundle size #15

Closed codeofsumit closed 6 years ago

codeofsumit commented 6 years ago

is the calculation wrong here? this seems way too big for a directive image

jessegavin commented 6 years ago

I am wondering if, because the first line of code does import Vue from 'vue', the editor plugin you're using includes the entire Vue package in that calculation.

The minified build result of vue-focus is 445 bytes.

codeofsumit commented 6 years ago

hmmm might be.

simplesmiler commented 6 years ago

As @jessegavin suggested, this is exactly the reason.

In the future, I will rewrite the code slightly to get the reference to Vue from the code consumer instead.