In version 2 I could do this:
````
window.SimpleBar = require('simplebar')
...
new window.SimpleBar(el)
````
But in version 3.1.0 it says that SimpleBar is not a constructor. How come?
Works fine on my side but I'm not using require so not sure. Might be something specific to your environment. What module loader are you using? Is that require.js?
I'm using Webpack (Laravel and Mix). How are you importing it, maybe I can get something from that?
I'm just using ES6 imports, like on the doc/examples.
Could you go on https://codesandbox.io/search?refinementList%5Btemplate%5D%5B0%5D=parcel
and look for an environment similar to yours and provide an example or your issue?
I have been using the plugin with Webpack without issue so that might be something in your environment or something I didn't consider but I have no way to know without a reproductible example.
Thanks!
@EmilMoe, Try this window.SimpleBar = require('simplebar/dist/simplebar');
Most helpful comment
@EmilMoe, Try this
window.SimpleBar = require('simplebar/dist/simplebar');