Tips and tricks to be aware of when deploying your own Svelte Widget/Library

Drupal Camp Asheville 2024 - July 12th-14th

Esteemed (229)
Start Time



Bernardo Martinez
University of Tennessee Chattanooga
Tips and tricks to be aware of when deploying your own Svelte Widget/Library session slide with a headshot of Bernado

Ever wish you could create universal widgets? A widget that could be placed in WordPress, Drupal, 11ty and anywhere else? Are you curious on how chat bots and other embed JavaScript widgets work? Stop by to gather some tips and tricks. There are plenty of tutorials out there on creating JavaScript apps but there's a lack on libraries and widgets.

Svelte compiles to vanilla JavaScript. Allowing you to have a relatively timeless piece of code that takes advantage of most features found in jQuery, Vue and React without the overhead of dealing with specific versions of those packages.

A standalone app has a different set of concerns than a widget. For example, an app usually needs to have a cache buster string on its JavaScript file but if is a widget that can't be there or one breaks backwards compatibility and if it is there, the browser cache won't load the latest version right away.

On this talk I will cover the differences between standalone JavaScript apps and library/widgets and how one can deal with their own unique challenges. As well as how Drupal core and contributed modules and others deal with this.

Session Files

Attachment Size
Luxury_Dev_Holidays-BernardoMartinez.pdf6.28 MB 6.28 MB