From ac57b98df77219c8529c4547b13366df3e998b2c Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Tue, 26 Nov 2024 04:33:40 +0200 Subject: implement esm version --- esm/scripts/slidetray.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'esm/scripts/slidetray.js') diff --git a/esm/scripts/slidetray.js b/esm/scripts/slidetray.js index 9091ec1..bb21aa8 100644 --- a/esm/scripts/slidetray.js +++ b/esm/scripts/slidetray.js @@ -1,10 +1,6 @@ -import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper.mjs?module' - - -// import { Navigation, Pagination } from 'swiper/modules'; - -// using Swiper as global -// TODO: load Swiper via requireJS async mode +/// import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper.mjs?module' +/// import { Navigation, Pagination } from 'https://unpkg.com/swiper@11.1.15/swiper-bundle.mjs?module'; +import Swiper from 'https://unpkg.com/swiper@11.1.15/swiper-bundle.mjs?module'; const slidetray = (setup) => { @@ -141,7 +137,7 @@ const slidetray = (setup) => { }, show: function() { - SwiperCore.use([Navigation, Pagination, Scrollbar]); + console.log('initer', this.presentation.initer); var swp = new Swiper(this.setup.selector, this.presentation.initer); this.swiper = swp; return this; -- cgit v1.2.3