FlexSlider
FlexSlider copied to clipboard
TypeError: ".flexslider is not a function" only if I import flexslider as node module using webpack
I faced with a weird error.
If I import flexslider as a node module like that
import 'flexslider';
or
import 'flexslider/jquery.flexslider';
I get an error as stated above.
However if I move that file outside node_modules directory and import it like that
import '../front/js/flexslider/js/jquery.flexslider';
everything works fine.
What's more I have no problem with other jQuery plugins imported from node_modules directory.
Is it possible that flexslider registers itself somehow to another jQuery instance, which then isn't available outside? Even if why does it work correctly if I just move that file to another directory? Could some settings from .json config files cause that issue?