vlitejs / vlite

🦋 vLitejs is a fast and lightweight Javascript library for customizing video and audio player in Javascript with a minimalist theme (HTML5, Youtube, Vimeo, Dailymotion)
https://vlite.js.org
MIT License
266 stars 18 forks source link

Upgrading to vlitejs@6 in jsdelivr.net doesn't work. #120

Closed ignl closed 6 months ago

ignl commented 8 months ago

Describe the bug

Version 5 works but when I update to version 6 I receive ReferenceError: Vlitejs is not defined.

Steps to reproduce

Expected behavior

Can access Vlitejs function after import in v6.

Screenshots and recordings

No response

Vlite.js

6.0.1

Browser

Any

OS

Linux

Additional context

No response

yoriiis commented 6 months ago

Hello @ignl, thanks for the report.

Vlitejs version 6 is ESM only, as explained in CHANGELOG.md. This is a radical change because not all projects are ready to move to EcmaScript modules yet, but that's where we are heading.

Documentation for use with a CDN describes the use case https://github.com/vlitejs/vlite?tab=readme-ov-file#cdn

If you cannot migrate your project to ESM, you can perfectly keep version 5, it is stable.

ignl commented 6 months ago

Ah OK thanks! Missed that.