sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.
https://www.lightgalleryjs.com/
Other
6.47k stars 1.29k forks source link

import videojs is not recognised #1415

Open bkno opened 1 year ago

bkno commented 1 year ago

I have been updating a website from using script tags to an esbuild app bundle. It seems that lightGallery thinks video js is not included though (have npm installed both).

import videojs from 'video.js'
import lightGallery from 'lightgallery';
import lgThumbnail from 'lightgallery/plugins/thumbnail';
import lgVideo from 'lightgallery/plugins/video';

JS console error: lightGallery:- Make sure you have included videojs

It works fine if I include video.js in a script tag though.

vansante commented 9 months ago

You can also do it like this:

import videojs from 'video.js'
window['videojs'] = videojs