I try to install PhotoSwipe gallery but had JS errors on html page -
"Uncaught ReferenceError: PhotoSwipeUI_Default is not defined"
As I understand it's because not all JS includes correctly.
Can anybody explain how to correctly install PhotoSwipe? It's possible with Mix?
PS: I try to install in this way:
yarn add photoswipe
in bottom of resources/assets/js/bootstrap.js I add
window.PhotoSwipe = require('photoswipe');
npm run dev