stimulus-carousel
stimulus-carousel copied to clipboard
swiper import fails on compilation
node_modules/stimulus-carousel/dist/stimulus-carousel.es.js file has this line:
import Swiper from "swiper/bundle";
The above won't compile because the name of the swiper js file is different. It's swiper/swiper-bundle.esm.js, not swiper/bundle...
If I change it to the following, compilation is successful and the carousel works:
import Swiper from "swiper/swiper-bundle";
Any comments on this please? Is this a bug in this library or something wrong on my system?
Environment:
- Ruby 3.0.2
- Rails 6.1.4.1
- Node 17.5.0
- Webpack 4.46.0
- Webpacker 5.4.2
One can also downgrade Swiper to 6.x by changing in package.json:
"swiper": "^6.0.0",
Hi ! When will you fix this in master ?
Which modules bundler do you use? Because, as you can see in their export keys, "./bundle"
refers to "./swiper-bundle.esm.js",
So it should work fine