Extra UMD Bundle
- Exports for CJS and ESM modules stay the same
- Adds an UMD bundle to the distributed package, so it can be included via unpkg etc. (fixes #147)
- The plugin is exposed as
EmblaCarouselWheelGestures
on the global object (window
), when embedding the UMD bundle using a script tag
Usage
<script src="https://unpkg.com/embla-carousel/embla-carousel.umd.js"></script>
<script src="https://unpkg.com/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.umd.js"></script>
<script type="text/javascript">
EmblaCarousel(document.querySelector('.embla__viewport'), { skipSnaps: true }, [
EmblaCarouselWheelGestures(),
])
</script>
Thanks to @davidcetinkaya for the idea to also provide an UMD bundle! 💡
Full Changelog: v2.0.0...v2.0.2