Skip to content

Import modules via npm import #125

Answered by jeffreyvr
nikolailehbrink asked this question in Q&A
Discussion options

You must be logged in to vote

This is setup from the Swiper documentation works for me:

resources/js/app.js

import Swiper, { Navigation, Pagination } from 'swiper';
import 'swiper/css';
import 'swiper/css/navigation';
import 'swiper/css/pagination';
window.addEventListener('load', function () {
      // ...
      const swiper = new Swiper('.swiper', {
            // configure Swiper to use modules
            modules: [Navigation, Pagination]
      });
});

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@nikolailehbrink
Comment options

@nikolailehbrink
Comment options

@charlie-george-1989
Comment options

@charlie-george-1989
Comment options

@charlie-george-1989
Comment options

Answer selected by nikolailehbrink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #124 on July 13, 2022 20:02.