Adding jQuery Libraries in Sage

Hi Gang how do I add a jQuery Library that isnt gettable via npm?

Usually i’d just enqueue this, but Im guessing its not the best way in Sage?

For reference this is the library im trying to enqueue: modal-video.js - jQuery Modal Video Plugin made with love by appleple

But it is gettable via npm/yarn, isn’t it?

3 Likes

So it is! My Bad - Thank you Carlos

Another quick question is how do I add it? I have ran npm install and added import ModalVideo from 'modal-video'; into my App.js file & new ModalVideo(‘.js-modal-btn’, {channel: ‘vimeo’});into a document ready wrapper & it still isnt working?

Did you yarn build?
Any errors on your browser console?
Which Sage version are you building on?

Show some code and I’ll try to help. Didn’t use that library though.