videojs-hotkeys icon indicating copy to clipboard operation
videojs-hotkeys copied to clipboard

Fix ESM import

Open ArtskydJ opened this issue 5 years ago • 0 comments

When I tried to use this module with rollup, it included the ESM version of video.js, instead of the CJS.

Probably because I was using it like this:

import videojs from 'video.js'
import 'videojs-hotkeys'

// ...

I think since video.js was first included as an ESM module, rollup just kept the ESM version. I'm not 100% sure, and I'm no rollup expert.

But this little code change fixed the issue for me, and shouldn't have any negative effects on folks continuing to use CJS.

ArtskydJ avatar Feb 23 '21 04:02 ArtskydJ