I just added the Swiper 4.0.2 from the cdnjs.
But as soon as I refresh the page, this error shows up on my console.
swiper.js:16 Uncaught TypeError: Cannot set property 'Swiper' of undefined
This is swiper.js line 16:
(global.Swiper = factory());
It seems that global is undefined.
Can anyone please help?
Thank you.
Your issue is closed because it is not filled correctly. Before you open an issue please review the contributing guideline.
Please fill the issue template correctly and:
It will save a lot of time for other contributors to check your issue and fix it.
Hi @ashussen , basically if you're still having this error. You just need to look onto your gulpfile.js under plugin.babel and look at the ignore section and just add swiper.js to the array.
.pipe(plugin.babel({
presets: ['es2015'],
compact: true,
ignore: ['what-input.js','swiper.js']
}))
Most helpful comment
Hi @ashussen , basically if you're still having this error. You just need to look onto your gulpfile.js under plugin.babel and look at the ignore section and just add swiper.js to the array.
.pipe(plugin.babel({ presets: ['es2015'], compact: true, ignore: ['what-input.js','swiper.js'] }))