Closed jpcaparas closed 7 years ago
Hi @jpcaparas ,
The following code should work fine.
import "lightgallery.js";
import "lg-zoom.js";
lightGallery(document.getElementById('lightgallery'));
Well, yes, but this is not ES6 best practice.
What you're suggesting is to pollute the global namespace loading the module for its side-effects. Why not implement a good ES6 module pattern in your library, with import/exports statements?
Hi @sachinchoolur, thx for your awesome Lightbox. Can you please support current ES6-Module specification ?
greetings
Working actively on v2 - https://github.com/sachinchoolur/lightGallery/blob/v2/src/lightgallery.ts#L42
Would appreciate it if you can include in the README examples of how the library and its modules can be imported using the ES6
import
statement.