Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #4705. Install modules in SvelteKit #4768

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

slava-viktorov
Copy link
Contributor

@slava-viktorov slava-viktorov commented Jul 16, 2021

Add a new "modules" property to the Svelte component. To solve the problem with installing additional Swiper modules when used in SvelteKit.

Fix #4705

…lem with installing additional Swiper models when used in SvelteKit.

Fix nolimits4web#4767
@slava-viktorov slava-viktorov changed the title Fix #4767. Install modules in SvelteKit Fix #4705. Install modules in SvelteKit Jul 17, 2021
@nolimits4web nolimits4web merged commit ddaa069 into nolimits4web:master Jul 22, 2021
@hmaesta
Copy link

hmaesta commented Jul 22, 2021

Am I missing something here? Updated to 6.8.0 and couldn't make it work.
https://codesandbox.io/s/sveltekit-swiper-3dxrg?file=/src/routes/index.svelte

@slava-viktorov
Copy link
Contributor Author

slava-viktorov commented Jul 23, 2021

Am I missing something here? Updated to 6.8.0 and couldn't make it work.
https://codesandbox.io/s/sveltekit-swiper-3dxrg?file=/src/routes/index.svelte

Please look at the pull request and the changes made to the code. I added a new property for the component
https://codesandbox.io/s/sveltekit-swiper-forked-iin8p?file=/src/routes/index.svelte

@hmaesta
Copy link

hmaesta commented Jul 23, 2021

Oh, now I get it. Thanks, Slava! 🤝

@nolimits4web
Copy link
Owner

@hmaesta also check the updated docs https://swiperjs.com/svelte#using-with-svelte-kit , it has information about new modules prop

@ProbeConstructor
Copy link

ProbeConstructor commented Aug 1, 2021

hi 👋, im new here and i wanna learn 🧠, why this works: https://codesandbox.io/s/h91ee
but this does not : https://codesandbox.io/s/5jix6
can someone guide me on this please 🙏, thank you 👍

@mweissen
Copy link

mweissen commented Aug 4, 2021

@ProbeConstructor: I would like to know that too.

@Slava: which new component was added? I haven't worked with the codesandbox enough yet. I am not clear where to find the pull request and what was really changed with it. Are the changes now part of swiperjs for sveltekit? Or in other words, how do I currently get swiper to work with sveltekit?

@slava-viktorov
Copy link
Contributor Author

slava-viktorov commented Aug 5, 2021

@ProbeConstructor @mweissen
Just read the documentation if you can't see the pull request and understand the changes in the code. The link to the documentation is in the previous comment. I will insert it here again for you, because it looks like this is a big deal for you https://swiperjs.com/svelte#using-with-svelte-kit.
But if you can't do that either, then just UPDATE swiper to the LATEST VERSION and copy the code from https://codesandbox.io/s/sveltekit-swiper-forked-iin8p?file=/src/routes/index.svelte

@hmaesta
Copy link

hmaesta commented Sep 6, 2021

A Codesandbox for anyone looking for SvelteKit + Swiper 7:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SvelteKit SSR support for Navigation, Pagination and Autoplay
5 participants