stimulus-carousel icon indicating copy to clipboard operation
stimulus-carousel copied to clipboard

swiper import fails on compilation

Open iraszl opened this issue 2 years ago • 3 comments

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

iraszl avatar Feb 18 '22 15:02 iraszl

One can also downgrade Swiper to 6.x by changing in package.json: "swiper": "^6.0.0",

iraszl avatar Feb 22 '22 03:02 iraszl

Hi ! When will you fix this in master ?

pierreTouzeImagile avatar Apr 08 '22 13:04 pierreTouzeImagile

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

guillaumebriday avatar Dec 23 '22 17:12 guillaumebriday