Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import videojs is not recognised #1415

Open
bkno opened this issue Oct 14, 2022 · 1 comment
Open

import videojs is not recognised #1415

bkno opened this issue Oct 14, 2022 · 1 comment

Comments

@bkno
Copy link

bkno commented Oct 14, 2022

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
Copy link

You can also do it like this:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants