The introduction of the swiper plugin in Vue reports an error: To install it, you can run: npm install --save swiper/css/swiper.css

The introduction of the swiper plugin in Vue reports an error: To install it, you can run: npm install --save swiper/css/swiper.css

Today, I used the Swiper plugin when writing the project, executed it npm install swiper vue-awesome-swiper --save, and introduced it. According to his prompt, I still reported an error at the end.
insert image description here

将main.js 中 import 'swiper/css/swiper.css' 
应该替换为 import 'swiper/swiper-bundle.css'

insert image description here
This is also mentioned on Github
insert image description here

Guess you like

Origin blog.csdn.net/m0_46374969/article/details/121719090