Closed klickreflex closed 1 year ago
Hi - well I can see there is no export for it in the package, https://github.com/dynamicweb/swiffy-slider/blob/main/package.json, so that has never been included. I will make a PR to add that so it can be included like the below:
import { swiffysliderextensions} from 'swiffy-slider/extensions';
window.swiffyslider.extensions = swiffysliderextensions;
But I do think you can just import it like ESM 6:
import {swiffysliderextensions} from 'swiffy-slider/dist/js/swiffy-slider-extensions.js';
window.swiffyslider.extensions = swiffysliderextensions;
BR Nicolai
Thank you, that's very nice.
Meanwhile I went back to SplideJS because I didn't manage to bundle it properly, but for the next project I'll be back. Swiffy's bunble size is really compelling :)
12kb Gzipped as SplideJS... It is almost 10 times as much :-)
Hello @nicped thanks for your work. Where is your PR for add extensions ?
Because webpack tells me this: ./dist/js/swiffy-slider-extensions.min.js is not exported from package
Thanks, Nicolas
I'm trying Swiffy Slider for the first time, and I add it to my bundle using Vite. As I'd like to add mouse dragging, I need
swiffy-slider-extensions
, but I cannot find a way to import them – is this intended or am I missing something?