moritzsternemann / vue-plausible

Plausible Analytics Vue.js Plugin and NuxtJS Module
MIT License
120 stars 8 forks source link

Is `defu` dependency necessary? #5

Closed slaweet closed 3 years ago

slaweet commented 3 years ago

I guess I'm probably missing something, but just from looking at the code in

https://github.com/moritzsternemann/vue-plausible/blob/57910ae1f9483f7f2130336f6d9d3e6cbb5c0d88/src/nuxt-module.ts#L15-L18

I would assume that defu doesn't have any difference compared to plain old spread operator.

Defu is 13.7% of the bundle size: https://bundlephobia.com/result?p=vue-plausible@1.1.2

moritzsternemann commented 3 years ago

Thanks for bringing this up! I will definitely look into it but it'll be a couple of weeks because I'm pretty busy right now 🙂