No swiper.css
See original GitHub issueBUG REPORT TEMPLATE
Vue.js version and component version
@vue/cli
: 4.4.1
swiper
: 6.0.4
vue-awesome-swiper
: 4.1.1
Reproduction
I think everywhere, just install with npm install swiper vue-awesome-swiper --save
What is Expected?
No error when compile.
What is actually happening?
ERROR Failed to compile with 1 errors
This dependency was not found:
* swiper/css/swiper.css in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/setting-box-carousel/SettingBoxCarousel.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save swiper/css/swiper.css
And in node_modules/swiper/
there isn’t any css
folder.
EDIT:
I found a (temporary?) solution. I use import 'swiper/swiper-bundle.css'
in my scss file.
EDIT2:
As @Charlie50503 said, use import "swiper/swiper-bundle.min.css";
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:27
- Comments:13
Top Results From Across the Web
Module not found: Can't resolve 'swiper/css' - Stack Overflow
In recent versions of Swiper, there is no longer a css folder. So... to put it simply: swiper/css no longer exists.
Read more >Getting Started With Swiper
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >[Solved]-Module not found: Can't resolve 'swiper/css'-Reactjs
If css files are not allowed to be imported individually, try adding them to the top root paths such as index.jsx. import 'swiper/swiper-bundle.css';....
Read more >Getting Started With Swiper
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >swiper - npm
Swiper is not compatible with all platforms, it is a modern touch slider which is focused only on modern apps/platforms to bring the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From the official README document, we can see :
Global Registration
Local Registration
can help me with this? i even cant read the plugin in my nuxt project.
ps: please update the doc.