bulma-carousel
bulma-carousel copied to clipboard
Carousel Navigation (or maybe the carousel module) does not work under Vuejs
I installed thru npm.
and I imported the module under App.vue Not sure is the way I imported it having problem or something else, if I import it like this:
<style lang="sass">
@import '~bulma'
@import '~bulma-carousel'
the npm will throw an Module build failed error:
Invalid CSS after "!": expected 1 selector or at-rule, was '!function(e,t){"obj' in F:\axd-tech-web-portal\node_modules\bulma-carousel\dist\js\bulma-carousel.min.js (line 1, column 1)
if I only import the sass:
<style lang="sass">
@import '~bulma'
@import '~bulma-carousel/dist/css/bulma-carousel'
it renders just fine but it lost the functionality of navigation, animation, etc that requires JS.
The last import try is the good one. But don't forget to also include the js file into your project to get the carousel works.
How to include it? I'm using the webpack so it's modularized.
@Scarittagle , you can check how I did it here. Or you can use the package directly if you feel so.