Skip to content
Discussion options

You must be logged in to vote

@Naksgh I'm using wp-scripts with a custom wordpress theme. It works well for me, I think the problem may be in your bundler setup?

https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/

import Swiper from 'swiper';
/* eslint-disable import/no-unresolved */
import { Navigation, Pagination, Autoplay, FreeMode } from 'swiper/modules';
import 'swiper/css';
import 'swiper/css/navigation';
import 'swiper/css/pagination';
import 'swiper/css/free-mode';
import 'swiper/css/autoplay';

// import Swiper from 'swiper/bundle';
// import 'swiper/css/bundle';
/* eslint-enable import/no-unresolved */
js

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Naksgh
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants