trvswgnr / bs5-lightbox

A pure JS lightbox gallery plugin for Bootstrap 5 based on the Modal and Carousel components
https://trvswgnr.github.io/bs5-lightbox/
MIT License
129 stars 28 forks source link

Increase compatibility #11

Closed patrickhrastnik closed 2 years ago

patrickhrastnik commented 2 years ago

Currently the project is compiled using module: "commonjs".

At @HolterDev we use AMD module resolution for our projects. We cannot include the current version of this project in our products since the project structure is incompatible.

Compiling bs5-lightbox with strategy UMD can increase its compatibility for multiple scenarios.

For now we compiled the project manually using UMD and included it in our products. I suggest to change to this strategy to make this package as compatible as possible. Alternatively I'd suggest to add a second webpack task to create an AMD/UMD compatible versions of the package.

patrickhrastnik commented 2 years ago

In case you want to have a look on some suggested changes: https://github.com/HolterDev/bs5-lightbox/tree/change_to_UMD

trvswgnr commented 2 years ago

I definitely agree. I ran into some issues trying to compile using UMD, otherwise I would do just that. I'm considering reworking my build process to implement this.

trvswgnr commented 2 years ago

@patrickhrastnik I updated this in v1.8.0. Let me know if it resolves this issue!