Answer the question
In order to leave comments, you need to log in
How to properly include the swiper slider module in webpack4?
Good afternoon! I'm trying to make a slider but I can't figure out how to connect it correctly. I use swiper, installed it in node modules, imported it, but when I call it, it gives an error that there is no such function. I wrapped the calling code in
// SCSS
import './assets/scss/main.scss'
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css';
// CSS (example)
import 'Swiper'
$(document).ready(function () {
let mySwiper = new Swiper('.js-news-slider', {
speed: 400,
spaceBetween: 100
});
});
but it did not help. Please tell me what is my mistake? here is the assembly
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question