ctd1500 / videojs-hotkeys

Adds more hotkey support to video.js
Apache License 2.0
196 stars 107 forks source link

Fix ESM import #78

Closed ArtskydJ closed 2 years ago

ArtskydJ commented 3 years ago

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.