We have our frontend development environment with Gulp/jQuery and are trying to migrate it on Webpack. While running our new setup, browser is showing following console error with jquery.mCustomScrollbar plugin :
Uncaught (in promise) TypeError: $cartList.mCustomScrollbar is not a function
We have tried to import it with the following ways in our main bundle, but it's still did not work:
// minified file
require("source/js/vendor/jquery.mCustomScrollbar.concat.min.js");
// and npm packages
require('../core/jquery.mousewheel.js');
require('../core/jquery.mCustomScrollbar');