I have Glide.js installed on Laravel 8. I was using the CDN to test it out and everything was working fine. When I installed it with NPM, I get this:
Uncaught TypeError: Glide is not a constructor
This is how I have it in bootstrap.js:
window.Glide = require('@glidejs/glide');
The Javascript is complied fine into app.js. I just can't figure out why it's showing that error. Any help would be appreciated, thanks!
Try it like this:
import Glide from '@glidejs/glide';
window.Glide = Glide;