You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building custom elements with Vue, the elements will rely on Vue's runtime. There is a ~16kb baseline size cost depending on how many features are being used.
In my local environment I was getting a bundle a lot larger than that, even though there wasn't a whole lot happening in the actual library code, so I got suspicious about that number in the docs.
So I've created a minimal sample project on stackblitz to test my theory. Which is barebones Vite + only 2 empty Vue components building as a custom elements library - and they're literally empty, just a single <div /> in each of them.
Here's what it says in the docs:
In my local environment I was getting a bundle a lot larger than that, even though there wasn't a whole lot happening in the actual library code, so I got suspicious about that number in the docs.
So I've created a minimal sample project on stackblitz to test my theory. Which is barebones Vite + only 2 empty Vue components building as a custom elements library - and they're literally empty, just a single
<div />
in each of them.And here's what it builds:
That's a bit more than 16 kb, even compressed. Maybe we should modify the docs because that looks misleading.
The text was updated successfully, but these errors were encountered: