cloudflare / embed-box

Universal install guide for embed codes and CMS plugins.
http://embedbox.io
MIT License
77 stars 12 forks source link

Optimize bundle size #124

Closed buremba closed 7 years ago

buremba commented 7 years ago

The bundle size is nearly 3MB and when we include EmbedBox, our website becomes slow. Therefore we load it lazily when the user clicks the button but it also takes some time to load it. t would be nice if we could make Embedbox more lightweight. It seems that all the images is also bundled in javascript file and it affects the file size dramatically, maybe we can extract them into separate folders?

adamschwartz commented 7 years ago

One thing we’ve avoided is creating too much much work for the developer to get things going. Maybe we could make a version of the build which points all image paths to CDN URLs? cc @TeffenEllis

GirlBossRush commented 7 years ago

@buremba, @adamschwartz,

It's interesting timing this was brought up because I had just been thinking the same thing a few days ago.

I believe a single build with a assetPath option wouldn't be too difficult for developers to configure.

buremba commented 7 years ago

Thanks!