vizhub-core / vizhub-feedback

VizHub feedback issue tracker
32 stars 3 forks source link

Svelte: Address Large Bundle Problem #730

Closed curran closed 2 years ago

curran commented 3 years ago

With Svelte programs, the bundle makes the viz too large to fork.

curran commented 3 years ago

This one, for example, has a bundle that is around 100KB. https://vizhub.com/curran/2db71d53e8a44ac5a3056638ef5cfd12?edit=files&file=bundle.js

curran commented 3 years ago

If sourcemaps are removed, the bundle becomes 15KB.

curran commented 3 years ago

In this example, there is more Svelte code included in the bundle, https://vizhub.com/higsch/92879bfeb9b14e2fb512f400b01bcfe6, due to use of bind:clientWidth={width}.

The Svelte implementation in VizHub is not pulling in things from CDN using <script> tags, but rather pulling in things from CDN and then including them in the bundle.

curran commented 3 years ago

Alternative solutions: