simplesmiler / vue-focus

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

bundle size #15

Closed codeofsumit closed 7 years ago

codeofsumit commented 7 years ago

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

jessegavin commented 7 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 7 years ago

hmmm might be.

simplesmiler commented 7 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.