bulma-carousel: Uncaught ReferenceError: bulmaCarousel is not defined
Hi, In my Laravel project, carousel is included
require('bulma-extensions/bulma-carousel/dist/bulma-carousel');
but
var carousels = bulmaCarousel.attach();
produces the said error. Carousel styling is fine but slider part is not working.
Any suggestion? Thanks!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (11 by maintainers)
Commits related to this issue
- build(gulpfile): Switch from rollup to webpack for Javascript compilation "fix #39" — committed to Wikiki/bulma-carousel by deleted user 6 years ago
We need to define
bulmaCarousel
explicitly. This works perfectly with Laravel Mix/Webpack.Arf… I’ll check this extension completely tomorrow.
in webpack.mix.js update the mix command to: mix.js(‘resources/assets/js/app.js’, ‘public/js’) .sass(‘resources/assets/sass/app.scss’, ‘public/css’) .copy(‘node_modules/bulma-extensions/bulma-carousel/dist/js/bulma-carousel.js’, ‘public/js’);
in your view include the JS file now available from the public/js folder and then init the extension using
var carousels = bulmaCarousel.attach()
I did but I a am getting same error. I have other extensions imported in similar manner. Tags Input is working fine.
Whether I do attach or not. Carousel slider is not working.